Re: netconsole: HARDIRQ-safe -> HARDIRQ-unsafe lock order warning

From: Mike Galbraith

Date: Tue Sep 30 2025 - 13:35:17 EST


On Tue, 2025-09-30 at 16:30 +0200, Sebastian Siewior wrote:
> On 2025-09-30 16:29:02 [+0206], John Ogness wrote:
> > @bigeasy: You have some experience cleaning up this class of
> > problems. Any suggestions?
>
> I though that we have netconsole disabled on RT. As far as I remember it
> disables interrupts and expects that the NAPI callback (as in interrupts)
> will not fire not will there be any packets sent. So this is not going
> to work.
> It needs to be checked what kind of synchronisation is expected of
> netconsole by disabling interrupts and providing this by other means.

Oh dear. It's not netconsole at the root, it's the netpoll it's made
of. The xmit loops are trylock, but memory alloc/free issue remains,
as does netpoll xmit loops holding IRQs off for up to a tick.

I've been using a test coverage and monitoring patchlet for years that
let's RT relax local exclusion to better suit its needs, substituting
BH for IRQ exclusion. Due to meeting $subject, patchlet now does the
same whenever wireless nics are in use, as BH exclusion fits them too.
Not super pretty, but dirt simple and effective.

-Mike