BUG/MINOR: mux-quic: do not access conn after idle list insert

Once a connection is inserted into the server idle/safe tree during
stream detach, it is not accessed anymore by the muxes without
idle_conns_lock protection. This is because the connection could have
been already stolen by a takeover operation.

Adjust QUIC MUX detach implementation to follow the same pattern. Note
that, no bug can occur due to takeover as QUIC does not implement it.
However, prior to this patch, there may still exist race-conditions with
idle connection purging.

No backport needed.
This commit is contained in:
Amaury Denoyelle 2025-08-20 17:16:28 +02:00
parent 0be225f341
commit b3ce464435

View File

@ -3822,6 +3822,11 @@ static void qmux_strm_detach(struct sedesc *sd)
goto release;
}
/* At this point, the connection has been added to the
* server idle list, so another thread may already have
* hijacked it, so we can't do anything with it.
*/
conn = NULL;
goto end;
}
else if (!conn->hash_node->node.node.leaf_p &&