diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-10-19 21:35:42 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-10-19 21:35:42 +0000 |
commit | 009582eb77dda55209d02e40d2b836050bda1e17 (patch) | |
tree | 015594621a34155e21c0c594a60906579d56e550 /sys | |
parent | 9f43dad9fc6c03f7de0b8524d64fa3cdac16bd58 (diff) | |
download | FreeBSD-src-009582eb77dda55209d02e40d2b836050bda1e17.zip FreeBSD-src-009582eb77dda55209d02e40d2b836050bda1e17.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_divert.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index f2fa212..b2161cf 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -693,6 +693,10 @@ div_modevent(module_t mod, int type, void *unused) * Module ipdivert can only be unloaded if no sockets are * connected. Maybe this can be changed later to forcefully * disconnect any open sockets. + * + * XXXRW: Note that there is a slight race here, as a socket + * could be opened between when we test and when we + * unregister. */ INP_INFO_RLOCK(&divcbinfo); n = divcbinfo.ipi_count; |