Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
3
-
9223372036854775807
Description
There appears to be a possibility that if some connections are being closed while some are still being created for the same control block, the race may result in LBUG inĀ ksocknal_connect:
if ((wanted & BIT(SOCKLND_CONN_ANY)) != 0) { type = SOCKLND_CONN_ANY; } else if ((wanted & BIT(SOCKLND_CONN_CONTROL)) != 0) { type = SOCKLND_CONN_CONTROL; } else if ((wanted & BIT(SOCKLND_CONN_BULK_IN)) != 0 && conn_cb->ksnr_blki_conn_count <= conn_cb->ksnr_blko_conn_count) { type = SOCKLND_CONN_BULK_IN; } else { LASSERT ((wanted & BIT(SOCKLND_CONN_BULK_OUT)) != 0); type = SOCKLND_CONN_BULK_OUT; }
This may happen if the previously created BULK_IN connection got closed, no more BULK_OUT connections are needed, but ksocknal_connect is trying again to create a BULK_IN connection. BecauseĀ ksnr_blki_conn_count didn't get decremented on close, the assertion will fail.
Fix this by making sure counters are decremented on close.