diff options
| author | Sven Eckelmann <sven@narfation.org> | 2026-10-08 18:29:16 +0200 |
|---|---|---|
| committer | Sven Eckelmann <sven@narfation.org> | 2026-10-30 10:11:25 +0100 |
| commit | f89eda5a9ccf82cba06b085b42ebc4886b8dfe9e (patch) | |
| tree | 2f1f8980f033161f6f5a8656441afeb6b1bd45ba /rust/kernel/alloc/allocator | |
| parent | 522e4aece2e96cacbb8a6ae1eec0d4c0dd6f4fed (diff) | |
batman-adv: stop originator purge worker before freeing TT
batadv_mesh_free() releases the translation tables via batadv_tt_free()
before batadv_originator_free() stops orig_work. The purge worker can
therefore still run while the TT is torn down. When an originator times
out, batadv_purge_orig_ref() calls batadv_tt_global_del_orig(), which
loads tt.global_hash and walks all buckets while taking their locks:
CPU0 CPU1
batadv_tt_free() batadv_purge_orig()
batadv_tt_global_del_orig()
hash = ...tt.global_hash;
batadv_tt_global_table_free()
batadv_hash_destroy(hash);
spin_lock_bh(&hash->list_locks[i]);
Disable orig_work at the beginning of batadv_mesh_free(), directly after
the mesh was marked as deactivating. The second
disable_delayed_work_sync() in batadv_originator_free() is harmless because
it is free'd anyway.
Cc: stable@vger.kernel.org
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260708091821.314516-1-sw%40simonwunderlich.de?part=3
Fixes: 9d31b3ce8168 ("batman-adv: fix potential TT client + orig-node memory leak")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions
