Annotate some ordering-related issues in solisten() which are not yet
resolved by socket locking: in particular, that we test the connection state at the socket layer without locking, request that the protocol begin listening, and then set the listen state on the socket non-atomically, resulting in a non-atomic cross-layer test-and-set.
This commit is contained in:
parent
c2c08bfea9
commit
1183f24cde
@ -265,6 +265,11 @@ solisten(so, backlog, td)
|
||||
{
|
||||
int s, error;
|
||||
|
||||
/*
|
||||
* XXXRW: Ordering issue here -- perhaps we need to set
|
||||
* SO_ACCEPTCONN before the call to pru_listen()?
|
||||
* XXXRW: General atomic test-and-set concerns here also.
|
||||
*/
|
||||
s = splnet();
|
||||
if (so->so_state & (SS_ISCONNECTED | SS_ISCONNECTING |
|
||||
SS_ISDISCONNECTING)) {
|
||||
|
Loading…
Reference in New Issue
Block a user