Re: [PATCH net-next v8 14/17] net: macb: move printk() calls out of bp->lock critical section

Théo Lebrun <[email protected]>
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hello Jakub,

On Tue Aug 11, 2026 at 2:08 AM CEST, Jakub Kicinski wrote:
> On Wed, 05 Aug 2026 19:42:43 +0200 Théo Lebrun wrote:
>> printk() while bp->lock is acquired is dangerous if netconsole is active
>> on the interface. In that setup, we might land in macb_poll_controller()
>> -> macb_interrupt() -> spin_lock(&bp->lock) but bp->lock is already  
>> acquired.
>
> Reportedly this patch adds:
>
> drivers/net/ethernet/cadence/macb_main.c: In function ‘macb_interrupt_misc’:
> drivers/net/ethernet/cadence/macb_main.c:2130:28: warning: variable ‘netdev’ set but not used [-Wunused-but-set-variable=]
>  2130 |         struct net_device *netdev;
>       |                            ^~~~~~
>
> which persists after the series.

Indeed. I'm always surprised the -Wunused* flags aren't enabled on some
archs at W=0. There is another instance but it's been there since 2017
and I don't touch this code (gem_get_ethtool_strings) so I cannot fix.

New revision for this.

Thanks,

--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.