batman-adv: Fix lock assert after fragmentation change 1017/head
authorSven Eckelmann <sven@narfation.org>
Tue, 22 Aug 2023 16:26:35 +0000 (18:26 +0200)
committerSven Eckelmann <sven@narfation.org>
Tue, 22 Aug 2023 16:54:12 +0000 (18:54 +0200)
commit7b3fd6323dfc9d66d4506d4363ce7f2ed1d8cf81
tree0c2b5bc44fac3ff3b25a7b919036f881071aef3a
parent12577be7ed6739fa9aa613dcaacd5555db286a66
batman-adv: Fix lock assert after fragmentation change

The automatic recalculation of the maximum allowed MTU is usually triggered
by code sections which are already rtnl lock protected by callers outside
of batman-adv. But when the fragmentation setting is changed via
batman-adv's own batadv genl family, then the rtnl lock is not yet taken.

But dev_set_mtu requires that the caller holds the rtnl lock because it
uses netdevice notifiers. And this code will then fail the check for this
lock:

  RTNL: assertion failed at net/core/dev.c (1953)

Fixes: 12577be7ed67 ("batman-adv: Merge bugfixes from 2023.2")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv/patches/0020-batman-adv-Fix-batadv_v_ogm_aggr_send-memory-leak.patch [new file with mode: 0644]