From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Nicolai Buchwitz <nb@tipi-net.de>,
Doug Berger <opendmb@gmail.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Justin Chen <justin.chen@broadcom.com>,
Florian Fainelli <f.fainelli@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: bcmgenet: fix NULL dereference in set_coalesce before first open
Date: Mon, 28 Sep 2026 10:29:41 -0700 [thread overview]
Message-ID: <d2ea7c1a-dd3b-42d3-9b58-74c89c9f2128@broadcom.com> (raw)
In-Reply-To: <20260928105642.856210-1-nb@tipi-net.de>
On 9/28/26 03:56, Nicolai Buchwitz wrote:
> The Rx ring priv and index are only set in bcmgenet_init_rx_ring(),
> which runs at open. Setting the Rx coalescing parameters on an interface
> that was never opened, e.g. "ethtool -C eth0 rx-usecs 50", dereferences
> a NULL ring->priv. The oops happens with RTNL held, so networking
> stays stuck until a reboot:
>
> Unable to handle kernel paging request at virtual address 0000000000002788
> pc : bcmgenet_set_rx_coalesce.isra.0+0x10/0x88
> lr : bcmgenet_set_coalesce+0xe8/0x180
> Call trace:
> bcmgenet_set_rx_coalesce.isra.0+0x10/0x88 (P)
> __ethnl_set_coalesce.isra.0+0x490/0x570
> ethnl_set_coalesce+0x48/0xc0
> ethnl_default_set_doit+0xf4/0x230
> genl_family_rcv_msg_doit+0xe8/0x160
> genl_rcv_msg+0x220/0x2a0
> netlink_rcv_skb+0x68/0x140
> genl_rcv+0x40/0x60
> netlink_unicast+0x338/0x3c0
> netlink_sendmsg+0x19c/0x3f8
> __sock_sendmsg+0x64/0xc0
> __sys_sendto+0x124/0x198
> __arm64_sys_sendto+0x30/0x48
>
> Set priv and index at probe. Writing the registers while the interface
> is down is harmless because open resets the MAC and
> bcmgenet_init_rx_coalesce() reapplies the stored values.
>
> Fixes: 9f4ca05827a2 ("net: bcmgenet: Add support for adaptive RX coalescing")
> Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Thanks Nicolai!
--
Florian
prev parent reply other threads:[~2026-09-28 17:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 10:56 Nicolai Buchwitz
2026-09-28 10:59 ` netdev-bot+sinfo
2026-09-28 11:03 ` Nicolai Buchwitz
2026-09-28 17:29 ` Florian Fainelli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2ea7c1a-dd3b-42d3-9b58-74c89c9f2128@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=f.fainelli@gmail.com \
--cc=justin.chen@broadcom.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nb@tipi-net.de \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®