cvs commit: src/sys/netinet ip_divert.c

Andre Oppermann andre at freebsd.org
Tue Oct 19 14:51:27 PDT 2004


Robert Watson wrote:
> 
> rwatson     2004-10-19 21:35:42 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/netinet          ip_divert.c
>   Log:
>   Annotate a newly introduced race present due to the unloading of
>   protocols: it is possible for sockets to be created and attached
>   to the divert protocol between the test for sockets present and
>   successful unload of the registration handler.  We will need to
>   explore more mature APIs for unregistering the protocol and then
>   draining consumers, or an atomic test-and-unregister mechanism.

Thanks.

I'll commit a little extended locking of that section in a few minutes.

Is it possible for someone else to spin on the lock while we are holding
it?  If yes, it would be impossible to destroy the lock on the next
line.  The same problem is then resident in ipfw unloading as well.

-- 
Andre


More information about the cvs-src mailing list