Thread (24 messages) flat view 24 messages, 2 authors, 28d ago

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

From: Théo Lebrun <theo.lebrun@bootlin.com>
Date: 2026-08-12 08:02:17
Also in: lkml

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:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help