aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/objdiff
diff options
context:
space:
mode:
authorYuqi Xu <xuyuqiabc@gmail.com>2026-09-28 16:24:38 +0800
committerDavid S. Miller <davem@davemloft.net>2026-10-02 08:20:15 +0100
commit3acdd44385bc7e2e57605e073691ce69cc5a960d (patch)
tree4e1c6cfb9701db5780c30f0cfa57805d92de9d76 /scripts/objdiff
parentMerge branch 'dim-overflow' (diff)
tipc: destroy topsrv workqueues before closing connections
tipc_topsrv_stop() closed subscriber connections while the topology server's send and receive workqueues were still running. Socket callbacks and subscription events could then queue more work, and in-flight send/recv work could drop the last connection reference during the conn_idr walk. That race produced several teardown failures: refcount_t addition on 0 from conn_get() on a connection whose release was blocked on idr_lock, a subsequent use-after-free in tipc_conn_close(), queue_work() on an already destroyed workqueue from the listener data-ready callback, and an RCU stall in tipc_topsrv_exit_net() while the walk spun under idr_lock. Clear srv->listener under idr_lock so it acts as a shutdown flag, skip queue_work() once it is NULL, destroy the workqueues to flush in-flight work, and only then close the remaining connections. Refuse tipc_conn_lookup() after that flag is cleared, and drop idr_lock when the teardown walk finds no connection, so an in-flight subscription event cannot pin idr_in_use while the walk holds the lock. v3 supersedes the narrower in-thread diff Tung Quang Nguyen posted on 2026-09-23. It keeps his teardown order and adds the lookup refusal and the empty-idr unlock. Fixes: c5fa7b3cf3cb ("tipc: introduce new TIPC server infrastructure") Cc: stable@vger.kernel.org Reported-by: Vega <vega@nebusec.ai> Assisted-by: LLM Signed-off-by: Yuqi Xu <xuyuqiabc@gmail.com> Reviewed-by: Ren Wei <weir@nebusec.ai> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions