summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2026-05-06 23:20:49 +0300
committerSven Eckelmann <sven@narfation.org>2026-05-08 15:28:44 +0300
commitce425dd05d0fe7594930a0fb103634f35ac47bb6 (patch)
tree61497a341fbd05b63617e755236903a615c0a863 /scripts
parentf03e8583532941b07761c5429de7d50766fa3110 (diff)
downloadlinux-ce425dd05d0fe7594930a0fb103634f35ac47bb6.tar.xz
batman-adv: tp_meter: fix tp_num leak on kmalloc failure
When batadv_tp_start() or batadv_tp_init_recv() fail to allocate a new tp_vars object, the previously incremented bat_priv->tp_num counter is never decremented. This causes tp_num to drift upward on each allocation failure. Since only BATADV_TP_MAX_NUM sessions can be started and the count is never reduced for these failed allocations, it causes to an exhaustion of throughput meter sessions. In worst case, no new throughput meter session can be started until the mesh interface is removed. The error handling must decrement tp_num releasing the lock and aborting the creation of an throughput meter session Cc: stable@kernel.org Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions