>> Holding the pcbinfo lock prevents races between syncache_socket() and
>> accept().  See rwatson's comment just above tcp_usr_accept.  I noted
>> this too (the comment above tod->tod_offload_socket() in tcp_syncache.c)
>> back when I updated the TOE code in the kernel.
>
> er, I think I told you why tcp_usr_accept holds the pcbinfo lock, which
> wasn't your original question... :-)

But it helped.

So I am thinking about trying a change where syncache_socket() would
call soalloc() first, get a socket, setup the inp, and then do a
(modified) sonewconn to place the socket in the listener's queue.
Robert's comment indicated that this would be a better way to
eliminate the race since we wouldn't need the pcblock when we make the
sonewconn call.

-vijay
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to