]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
batman-adv: Avoid WARN_ON timing related checks
authorSven Eckelmann <sven@narfation.org>
Sat, 20 Nov 2021 12:39:39 +0000 (13:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 10:58:45 +0000 (11:58 +0100)
commit45011f2973f6b52cf50db397bb27bf805f5f0e7f
tree04a34f6a20fcf056f1665d2ae3c6c874181b14fd
parent5cf60ad2478b4b5090ff70f1b4d027d1103220c1
batman-adv: Avoid WARN_ON timing related checks

commit 9f460ae31c4435fd022c443a6029352217a16ac1 upstream.

The soft/batadv interface for a queued OGM can be changed during the time
the OGM was queued for transmission and when the OGM is actually
transmitted by the worker.

But WARN_ON must be used to denote kernel bugs and not to print simple
warnings. A warning can simply be printed using pr_warn.

Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Reported-by: syzbot+c0b807de416427ff3dd1@syzkaller.appspotmail.com
Fixes: ef0a937f7a14 ("batman-adv: consider outgoing interface in OGM sending")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
[ bp: 4.4 backported: adjust context. ]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/batman-adv/bat_iv_ogm.c