]> git.itanic.dy.fi Git - linux-stable/commit
batman-adv: Avoid WARN_ON timing related checks
authorSven Eckelmann <sven@narfation.org>
Tue, 18 May 2021 19:00:27 +0000 (21:00 +0200)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:49:13 +0000 (08:49 -0400)
commit6031daaaf6d5c359c99dfffa102e332df234ff09
tree0979274a3f265b200739cb3ea3249be9ec41ce88
parent3c5c213e0668b03723128625f16ea24d4f7d732a
batman-adv: Avoid WARN_ON timing related checks

[ Upstream commit 9f460ae31c4435fd022c443a6029352217a16ac1 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/batman-adv/bat_iv_ogm.c