All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolai Buchwitz <nb@tipi-net.de>
To: "Théo Lebrun" <theo.lebrun@bootlin.com>
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:42:23 +0200	[thread overview]
Message-ID: <abd06220b7909c1feeb6b6100272c787@tipi-net.de> (raw)
In-Reply-To: <20260925-macb-netdev-register-race-v1-1-752f90ce1c39@bootlin.com>

Hi Théo

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.

> [...]

Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>

Thanks
Nicolai

  reply	other threads:[~2026-09-25 13:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 13:15 [PATCH net] net: macb: init workqueues before register_netdev() Théo Lebrun
2026-09-25 13:42 ` Nicolai Buchwitz [this message]
2026-09-25 13:58   ` Théo Lebrun
2026-09-29 13:15 ` netdev-bot+sashiko
2026-10-01  0:00 ` patchwork-bot+netdevbpf

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=abd06220b7909c1feeb6b6100272c787@tipi-net.de \
    --to=nb@tipi-net.de \
    --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=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sashiko@sashiko.dev \
    --cc=stable@vger.kernel.org \
    --cc=theo.lebrun@bootlin.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.