diff options
author | 2012-07-07 18:48:19 +0000 | |
---|---|---|
committer | 2012-07-07 18:48:19 +0000 | |
commit | 2627cc475fc30a434b463c96b3357d9853c540ba (patch) | |
tree | cdda50c47b78209434ac831fc35979d0d39f85d8 /lib/libc | |
parent | remove incorrect check in pfctl preventing set-tos for ipvshit. (diff) | |
download | wireguard-openbsd-2627cc475fc30a434b463c96b3357d9853c540ba.tar.xz wireguard-openbsd-2627cc475fc30a434b463c96b3357d9853c540ba.zip |
Fix two races in socket splicing. When somove() gets called from
sosplice() to move the data already there, it might sleep in
m_copym().
Another process must not unsplice during that sleep, so also lock
the receive buffer when sosplice is called with fd -1.
The same sleep can allow network interrupts to modify the socket
buffer. So use sbsync() to write back modifications within the
loop instead of fixing the socket buffer after the loop.
OK claudio@
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions