From: "Théo Lebrun" <theo.lebrun@bootlin.com>
To: "Nicolai Buchwitz" <nb@tipi-net.de>
Cc: "Conor Dooley" <conor.dooley@microchip.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Eric Dumazet" <edumazet@kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
"Gregory CLEMENT" <gregory.clement@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
<stable@vger.kernel.org>, "sashiko" <sashiko@sashiko.dev>
Subject: Re: [PATCH net] net: macb: init workqueues before register_netdev()
Date: Fri, 25 Sep 2026 15:58:16 +0200 [thread overview]
Message-ID: <DLOG87E6TO4D.10IN5DZI777OL@bootlin.com> (raw)
In-Reply-To: <abd06220b7909c1feeb6b6100272c787@tipi-net.de>
On Fri Sep 25, 2026 at 3:42 PM CEST, Nicolai Buchwitz wrote:
> On 25.9.2026 15:15, Théo Lebrun wrote:
>> register_netdev() exposes the interface to userspace which might
>> trigger
>> operations like close on it. Those access the HRESP/LPI tasks and
>> might therefore use them uninitialised.
>>
>> Fix this race by initialising both `struct work_struct` before
>> register_netdev().
>>
>> Theoretical bugfix. The main reason for fix is to avoid future Sashiko
>> reports which triggers if we grow the race condition (by touching those
>> workqueues at open for example). The likeliness of this bug sounds
>> tiny, but I've not spent any time trying to reproduce it.
>>
>> Fixes: c5092ba3155e ("net: macb: Convert tasklet API to new bottom half
>> workqueue mechanism")
>
> IMHO the "bug" was introduced in 032dc41ba6e2? But this would generate
> more
> backporting without any real use. So let's keep it as is.
I used this command to find the introduction of hresp_err_bh_work and
didn't notice it was only a tasklet to workqueue conversion patch.
You are correct.
git log --oneline -Shresp_err_bh_work drivers/net/ethernet/cadence/
> Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Thanks!
--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2026-09-25 13:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 13:15 Théo Lebrun
2026-09-25 13:42 ` Nicolai Buchwitz
2026-09-25 13:58 ` Théo Lebrun [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=DLOG87E6TO4D.10IN5DZI777OL@bootlin.com \
--to=theo.lebrun@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=conor.dooley@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nb@tipi-net.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashiko@sashiko.dev \
--cc=stable@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.kondratiev@mobileye.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®