summaryrefslogtreecommitdiffstats
path: root/sys/libkern/mcount.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-07-11 23:13:14 +0000
committerrwatson <rwatson@FreeBSD.org>2004-07-11 23:13:14 +0000
commit566f5dc2ee9e1c9b9cb8eb5366befb8ab0c5390e (patch)
treef4c06603a7e330a421947a619d47e9728fed7ef2 /sys/libkern/mcount.c
parent7017e4d3c191fe220187c61debca0b83061fd38c (diff)
downloadFreeBSD-src-566f5dc2ee9e1c9b9cb8eb5366befb8ab0c5390e.zip
FreeBSD-src-566f5dc2ee9e1c9b9cb8eb5366befb8ab0c5390e.tar.gz
Use sockbuf_pushsync() to synchronize stack and socket buffer state
in soreceive() after removing an MT_SONAME mbuf from the head of the socket buffer. When processing MT_CONTROL mbufs in soreceive(), first remove all of the MT_CONTROL mbufs from the head of the socket buffer to a local mbuf chain, then feed them into dom_externalize() as a set, which both avoids thrashing the socket buffer lock when handling multiple control mbufs, and also avoids races with other threads acting on the socket buffer when the socket buffer mutex is released to enter the externalize code. Existing races that might occur if the protocol externalize method blocked during processing have also been closed. Now that we synchronize socket buffer and stack state following modifications to the socket buffer, turn the manual synchronization that previously followed control mbuf processing with a set of assertions. This can eventually be removed. The soreceive() code is now substantially more MPSAFE.
Diffstat (limited to 'sys/libkern/mcount.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud