Page MenuHomeFreeBSD

bhyve: Fix truncate_iov()
ClosedPublic

Authored by markj on Sun, Feb 22, 4:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 26, 8:56 AM
Unknown Object (File)
Wed, Feb 25, 7:43 PM
Unknown Object (File)
Wed, Feb 25, 7:04 PM
Unknown Object (File)
Wed, Feb 25, 11:24 AM
Unknown Object (File)
Wed, Feb 25, 9:53 AM
Unknown Object (File)
Wed, Feb 25, 7:18 AM
Unknown Object (File)
Wed, Feb 25, 4:39 AM
Unknown Object (File)
Wed, Feb 25, 4:22 AM

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 70878
Build 67761: 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
88

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
This revision was automatically updated to reflect the committed changes.