mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure
@ 2026-09-13  3:19 Deepanshu Kartikey
  2026-09-13 20:40 ` Sven Eckelmann
  0 siblings, 1 reply; 2+ messages in thread
From: Deepanshu Kartikey @ 2026-09-13  3:19 UTC (permalink / raw)
  To: marek.lindner, sw, antonio, sven
  Cc: b.a.t.m.a.n, linux-kernel, Deepanshu Kartikey,
	syzbot+a079f084653164a652d1

batadv_orig_ifinfo_new() returns NULL only when its GFP_ATOMIC
allocation fails, which is a normal runtime condition and not a bug.
batadv_v_ogm_forward() already handles this the same way, simply
checking for NULL without a WARN_ON.

Do the same in batadv_iv_ogm_update_seqnos() to avoid a spurious
WARN_ON splat when the allocation fails (e.g. under fault injection).

Fixes: 7351a4822d42 ("batman-adv: split out router from orig_node")
Reported-by: syzbot+a079f084653164a652d1@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=a079f084653164a652d1
Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
---
 net/batman-adv/bat_iv_ogm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 53fbdbbe8f4f..d8a6a0f64ce2 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -1410,7 +1410,7 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
 		return BATADV_NO_DUP;
 
 	orig_ifinfo = batadv_orig_ifinfo_new(orig_node, if_outgoing);
-	if (WARN_ON(!orig_ifinfo)) {
+	if (!orig_ifinfo) {
 		batadv_orig_node_put(orig_node);
 		return 0;
 	}
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure
  2026-09-13  3:19 [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure Deepanshu Kartikey
@ 2026-09-13 20:40 ` Sven Eckelmann
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Eckelmann @ 2026-09-13 20:40 UTC (permalink / raw)
  To: marek.lindner, sw, antonio, Deepanshu Kartikey
  Cc: b.a.t.m.a.n, linux-kernel, syzbot+a079f084653164a652d1


On Sun, 13 Sep 2026 08:49:06 +0530, Deepanshu Kartikey wrote:
> batman-adv: avoid WARN_ON for orig_ifinfo allocation failure

Applied, thanks!

[1/1] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure
      https://git.open-mesh.org/batadv/c/abfe281aeab4

Best regards,
-- 
Sven Eckelmann <sven@narfation.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-13 20:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-13  3:19 [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure Deepanshu Kartikey
2026-09-13 20:40 ` Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®