aboutsummaryrefslogtreecommitdiff
path: root/share/doc/usd/04.csh/(developers-only)
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2025-03-23 11:55:56 +0000
committerMark Johnston <markj@FreeBSD.org>2025-03-23 11:55:56 +0000
commit574816356834cb99295b124be0ec34bd9e0b9c72 (patch)
treeaf79a4d3c7e7be8c62d11a02636b00f4bd65e91e /share/doc/usd/04.csh/(developers-only)
parente9a846468acfbba35ca40b888670559aaff7228d (diff)
socket: Fix a race in the SO_SPLICE state machineHEADmain
When so_splice() links two sockets together, it first attaches the splice control structure to the source socket; at that point, the splice is in the idle state. After that point, a socket wakeup will queue up work for a splice worker thread: in particular, so_splice_dispatch() only queues work if the splice is idle. Meanwhile, so_splice() continues initializing the splice, and finally calls so_splice_xfer() to transfer any already buffered data. This assumes that the splice is still idle, but that's not true if some async work was already dispatched. Solve the problem by introducing an initial "under construction" state for the splice control structure, such that wakeups won't queue any work until so_splice() has finished. While here, remove an outdated comment from the beginning of so_splice_xfer(). Reported by: syzkaller Reviewed by: gallatin Fixes: a1da7dc1cdad ("socket: Implement SO_SPLICE") MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D49437
Diffstat (limited to 'share/doc/usd/04.csh/(developers-only)')
0 files changed, 0 insertions, 0 deletions