Page MenuHomeFreeBSD

bhyve: Fix truncate_iov()
AcceptedPublic

Authored by markj on Sun, Feb 22, 4:16 PM.
Tags
None
Referenced Files
F145746417: D55438.diff
Mon, Feb 23, 9:53 PM
F145746386: D55438.diff
Mon, Feb 23, 9:53 PM
F145746349: D55438.diff
Mon, Feb 23, 9:53 PM

Details

Summary

The implementation was simply wrong. It would always just return the
first entry in the iovec, even if the requested length is larger than
that first entry.

Note, this function will be removed soon, see D53468.

Reported by: Vinod p n <vinod272@gmail.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70894
Build 67777: arc lint + arc unit

Event Timeline

markj requested review of this revision.Sun, Feb 22, 4:16 PM
This revision is now accepted and ready to land.Sun, Feb 22, 6:31 PM
des added inline comments.
usr.sbin/bhyve/iov.c
87

I found this slightly confusing...

(personally I would have dropped done and just decremented length until it reached 0)

Take Dag-Erling's suggestions.

This revision now requires review to proceed.Mon, Feb 23, 12:50 AM
This revision is now accepted and ready to land.Mon, Feb 23, 1:50 AM