diff options
| author | Yehyeong Lee <yhlee@isslab.korea.ac.kr> | 2026-11-10 21:50:02 +0900 |
|---|---|---|
| committer | Juergen Gross <jgross@suse.com> | 2026-11-11 14:22:31 +0100 |
| commit | 6b3feb6bfa9ac384f7a3ec25c40b9b4d3da96d25 (patch) | |
| tree | c704d1bfe918ae6ea1ec1a93b0bbfeae276f56c4 /scripts/Makefile.thinlto | |
| parent | 702ba3c80a8736898813a2c7484d695278aa114d (diff) | |
| download | lwn-6b3feb6bfa9ac384f7a3ec25c40b9b4d3da96d25.tar.gz lwn-6b3feb6bfa9ac384f7a3ec25c40b9b4d3da96d25.zip | |
xen/pvcalls: destroy the per-socket workqueue on release
pvcalls_new_active_socket() gives every active socket its own ordered
workqueue:
map->ioworker.wq = alloc_ordered_workqueue("pvcalls_io", 0);
and nothing ever destroys it. pvcalls_back_release_active() flushes
map->ioworker.register_work and frees map, but the workqueue and its
pool_workqueues stay allocated, so a frontend leaks a workqueue per socket
it connects and releases - a loop a guest can run as long as it likes.
Destroy it right after flush_work(): the IRQ is disabled and sk_data_ready
restored by then, so nothing can queue new work, and the rings are still
mapped while it drains - pvcalls_conn_back_read() reads map->ring and
map->data, which xenbus_unmap_ring_vfree() takes away a few lines later.
pvcalls_back_ioworker() does not take fedata->socket_lock, which the
backend_disconnect() caller holds here - only the socket's own
sk_receive_queue lock - so draining it from this point is safe; the
flush_work() just above already has the same requirement.
Fixes: 5db4d286a8ef ("xen/pvcalls: implement connect command")
Cc: stable@vger.kernel.org
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Yehyeong Lee <yhlee@isslab.korea.ac.kr>
Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20261110125002.46683-3-yhlee@isslab.korea.ac.kr>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
