HEADS UP: socket and pcb reference changes entering tree today
Robert Watson
rwatson at FreeBSD.org
Sun May 21 11:05:04 PDT 2006
On Sun, 21 May 2006, Maxim Konovalov wrote:
>> This looks good in terms of pcb structure, but you should acquire SOCK_LOCK
>> around the so_state manipulation. To prevent races, I suggest doing it
>> while also holding the INP lock in the center of the locking sets from the
>> inpcb. There are some other remaining bugs in the raw socket code elsewhere
>> also, I think.
>
> I "copied" this code from udp_usrreq.c::udp_disconnect(). There is no such
> lock. Is it a bug too?
Yes.
I have some intuitions about why the datagram protocols manually frob the
disconnected flag rather than calling soisdisconnected(), but am generally
unsure that this is the right thing.
Robert N M Watson
More information about the freebsd-current
mailing list