sockbuf locking in sctp_sosend()

Mark Johnston markj at freebsd.org
Fri May 21 18:33:27 UTC 2021


Hi,

As part of an attempt to finally fix races with listen(2), I have some
patches which move the socket I/O sx locks out of struct sockbuf and
into the owning socket structure.  This is a prerequisite for
synchronizing socket I/O with listen(2), since most pru_sosend routines
acquire the sx lock as their first operation.

I noticed though that among pru_sosend implementations, scpt_sosend() is
unique in that it does not use sblock() to serialize senders.  Is that
intentional?  I see that sctp_soreceive() uses it.


More information about the freebsd-transport mailing list