🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7385

[PATCH net 01/10] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure

#7385
From: Simon Wunderlich
Date: Mon, 26 Oct 2026 08:53
36 lines
10362 bytes
From: Deepanshu Kartikey <kartikey406@gmail.com>

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>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
 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 89b499f7a37dd..158d2b8f04036 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.47.3
Technical Details
Message-ID: <20261026085309.1074911-2-sw@simonwunderlich.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351768-linux-kernel-netdev=dewy.ru
References: <20261026085309.1074911-1-sw@simonwunderlich.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351768-linux-kernel-netdev=dewy.ru
From: sw@simonwunderlich.de (Simon Wunderlich)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 01/10] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure
Date: Mon, 26 Oct 2026 09:53:00 +0100
Organization: Usenet Network
Message-ID: <20261026085309.1074911-2-sw@simonwunderlich.de>
References: <20261026085309.1074911-1-sw@simonwunderlich.de>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network; logging-data="1264975"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:rnGvM9NF9YF++lgf1UUDHITde7c= sha256:/5hILtFhrhKyhH6/NMRrpf6+tyMpXLW9MA4i8yCtAcQ= sha1:bHWGBqPx8bVbvHvg6edg0bdbHus= sha256:8nGzqdcOofa6gof0nK1lvaXA+WcPbbkIjDD8ZzZ3kvE=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 66F34125B8E; Mon, 26 Oct 2026 11:53:48 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=simonwunderlich.de
X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M73hxfJAhXpz; Mon, 26 Oct 2026 11:53:45 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-351768-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=simonwunderlich.de
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id C226F125B92; Mon, 26 Oct 2026 11:53:32 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 339AB29AA3; Mon, 26 Oct 2026 08:53:24 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793004801; b=KW3lRtXrfdVoeJw4kY0QidTOkvIEn9q4/7VEl3rGJ6O7TJT6egVLgwHS4r0kk07I939Q y4ADwcbxZkRishKBVivkwD9x1b0FEOhaK+3SEcDHQ/jSgGGL0jZN8PfNwVtbYqOKpzK9X A2EY0QZw/CzDkrSno5HfqbZrq68DDvaE23EkCrMOKiRcaL8rUA1U83nXLnLBXezOgSiyd AYBrCWH/iNUC4w95styxFur0L8lPt8AjR7dGJMKHB/2F7y6ksDw87RUwtcwD2i9mGRfde JjzMG/MvcRU9WPBjkgGFQpt5ywq3yohGUFInsOTMD8+Djq2Da+aKEVGteHXzlUpuU8Q==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793004801; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=28nCSEvhlsnWDh1U08MOT7RrXgp6P/j1+6eqZ0qC0cg=; b=pihnrBf1T5wma/+7yqI5NN/oE1FznazqADxxK6jzfwcMRr4MDhhhcP31JxHWCzKXSVcJ cVdfg4iNtsYv+I18yhzBI8zBWBBqKnVR8qYXAbSQ6uRKVlyCgfHAjAmpdvxFTsZgH/UgW AycmM9xMqUHVA4ZBJOCv2w3ZfDWU7QFROsZMQ6ZSvu8qk6SzkNYn21P1irf4G/4LK3GC6 LgyqQRhcwEyRhWTGt1J5HyR2v/eL5jYu117Ken+vN4IXE3rQyBIZo76QDIQOdo2qomerN bVxXtXSR0sYi2RmuGrb/oVgx5LmZNHN6Ie3Qe6UyH47rldjR3JttY5r8BImXJXD6LZQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=DUS83EQp; dmarc=pass header.from=simonwunderlich.de; spf=pass smtp.mailfrom=simonwunderlich.de; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5891F606A329; Mon, 26 Oct 2026 08:53:21 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=DUS83EQp
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=23.88.38.48
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793004800; b=EAgBgeidnW0dlgPQh6Z4uyHmvL7TBqnB7637udhlZx7a7Yy8f+iU31De2xi8NB4+Jwut gXXcORN3MIGyLLoeXsRyaLLMLB6smp+OlgvvjK6ryhMtUcXOz+OxnuKZvRtHQnL7yV68J y4JCfucdPZ3S5l/BONdJSf6dOKkSxw5C9gSngGi5Ki4GpiYnZdvxbmTsxLNYYdSQINGq9 KErvlDZORqJEoNytNRO1nqQR3ScziIur/Fbz1+BqW8xrsrV5YzkJmfEXkUSR3og+9uxne jxaje8TW1F6ZetV2J+9Va2KRSlHAcl87XTXWZlpSG4frUDYPfVSpgEgGcCGL3StA0zQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793004800; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=28nCSEvhlsnWDh1U08MOT7RrXgp6P/j1+6eqZ0qC0cg=; b=JYPCfDFm3sJomfecoypSZx/hs5rKfimLkgzDpNb5eyVlET493bRqa5apmTpXSaCt4BDe ZmTlAWAYlf9wflF28xz6RI8qU7v8rzWzRREKzJOQKZndcskAoFLUIr0yvP1AdHfL1lbeW ivIl7kP006jWLQ7Hfvhe8QSh+eOov7C01Bi8A/EKx299SPUgVsUiXvgF3ewFtmhkpfjHE EUmQ+1pMPlUdR9O4r8lehLC5oWPYrO+c2e2sQ4rnB7WFo4gjEFM77FDvSgxUEoZ6hR226 lxGq9sWJ056c5DOOvvgYHfrmRYvY109wdcupERolWQzK3mRQvBB/4AGON0224D3PAeQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=simonwunderlich.de; spf=pass smtp.mailfrom=simonwunderlich.de; dkim=pass header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=DUS83EQp; arc=none smtp.remote-ip=23.88.38.48
X-Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [23.88.38.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with UTF8SMTPS id 641E3606A31B for <netdev@vger.kernel.org>; Mon, 26 Oct 2026 08:53:19 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 641E3606A31B
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=simonwunderlich.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=simonwunderlich.de
X-Received: from kero.packetmixer.de (p200300C5973ce5d80Fc8DfE94A24022D.dip0.t-ipconnect.de [IPv6:2003:c5:973c:e5d8:fc8:dfe9:4a24:22d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.simonwunderlich.de (Postfix) with UTF8SMTPSA id 60C96FA010; Mon, 26 Oct 2026 09:53:11 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1793004791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=28nCSEvhlsnWDh1U08MOT7RrXgp6P/j1+6eqZ0qC0cg=; b=DUS83EQpn3JUfEDeMQFkHHPjnfm6S6qogcn05D220PmqBZ7CcqP8a3/jGWfQGB5cXejj6b Ut/M0ORE91NFAi+0L6PVWLi1AHXSIb66wAE7qTfi1UNfIXsSmFbOGEf+JcklEACBt8WpbT GpVKr6p5k2W7BHH0dYX/R8ASiqoxw+vrU3wRy9ZwQqZrlggvdBfUkOF7NS55/dBZxXWP2R ESiQRfb/TPPU3rruFkwxeI3D3b3tEVGuxEaxadX096AFAqQwTUKVAZQO/bHcpCRfSpzUlM /ktLMOAgtdBSAVoWMryX+EsIfAyC7IlDfJ1HvVVm2cnerWhldkc24qdwJJ9e2w==
X-Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, b.a.t.m.a.n@lists.open-mesh.org, Deepanshu Kartikey <kartikey406@gmail.com>, syzbot+a079f084653164a652d1@syzkaller.appspotmail.com, Sven Eckelmann <sven@narfation.org>, Simon Wunderlich <sw@simonwunderlich.de>
X-Mailer: git-send-email 2.47.3
X-In-Reply-To: <20261026085309.1074911-1-sw@simonwunderlich.de>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Received-Bytes: 10056