]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
batman-adv: v: prevent OGM aggregation on disabled hardif
authorSven Eckelmann <sven@narfation.org>
Thu, 11 Jun 2026 19:47:28 +0000 (21:47 +0200)
committerSven Eckelmann <sven@narfation.org>
Sat, 13 Jun 2026 05:57:52 +0000 (07:57 +0200)
commitd11c00b95b2a3b3934007fc003dccc6fdcc061ad
tree29e28708f228d2eba6bd39ee5dc2198c08ae9e04
parent493d9d2528e1a09b090e4b37f0f553def7bd5ce9
batman-adv: v: prevent OGM aggregation on disabled hardif

When an interface gets disabled, the worker is correctly disabled by
batadv_hardif_disable_interface() -> ... -> batadv_v_ogm_iface_disable().
In this process, the skb aggr_list is also freed.

But batadv_v_ogm_send_meshif() can still queue new skbs (via
batadv_v_ogm_queue_on_if()) to the aggr_list. This will only stop after all
cores can no longer find the RCU protected list of hard interfaces. These
queued skbs will never be freed or consumed by batadv_v_ogm_aggr_work.

The batadv_v_ogm_iface_disable() function must block
batadv_v_ogm_queue_on_if() to avoid leak of skbs.

Cc: stable@kernel.org
Fixes: f89255a02f1d ("batman-adv: BATMAN_V: introduce per hard-iface OGMv2 queues")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/bat_v.c
net/batman-adv/bat_v_ogm.c
net/batman-adv/types.h