Re: [PATCH net] net: macb: init workqueues before register_netdev()
From: Nicolai Buchwitz
Date: Fri Sep 25 2026 - 09:42:44 EST
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@xxxxxxxxxxx>
Thanks
Nicolai