summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authorlstewart <lstewart@FreeBSD.org>2013-06-19 03:08:01 +0000
committerlstewart <lstewart@FreeBSD.org>2013-06-19 03:08:01 +0000
commita203bbbf37f6842eb1ac5cf7d21546fef7a4af67 (patch)
treeb9249af163445dfe034fa51313f25f8d0e37a6eb /lib/libthr
parentb81bfe8f58d04781508f6dc459a35ec3d226b66c (diff)
downloadFreeBSD-src-a203bbbf37f6842eb1ac5cf7d21546fef7a4af67.zip
FreeBSD-src-a203bbbf37f6842eb1ac5cf7d21546fef7a4af67.tar.gz
When a previous call to sbsndptr() leaves sb->sb_sndptroff at the start of an
mbuf that was fully consumed by the previous call, the mbuf ptr returned by the current call ends up being the previous mbuf in the sb chain to the one that contains the data we want. This does not cause any observable issues because the mbuf copy routines happily walk the mbuf chain to get to the data at the moff offset, which in this case means they effectively skip over the mbuf returned by sbsndptr(). We can't adjust sb->sb_sndptr during the previous call for this case because the next mbuf in the chain may not exist yet. We therefore need to detect the condition and make the adjustment during the current call. Fix by detecting the special case of moff being at the start of the next mbuf in the chain and adjust the required accounting variables accordingly. Reviewed by: andre MFC after: 2 weeks
Diffstat (limited to 'lib/libthr')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud