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.
This commit is contained in:
parent
72584fd2c0
commit
279128e295
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user