Re: [PATCH] stackdepot: don't WARN when the depot runs out of pools

From: John Ogness

Date: Wed Nov 04 2026 - 03:21:02 EST


On 2026-11-03, Breno Leitao <leitao@xxxxxxxxxx> wrote:
> That deferral only applies to legacy consoles. ON nbcon WARN() puts the
> CPU in emergency mode, and in emergency mode printk() flushes all
> pending records to the nbcon consoles from the calling context.

Yes. WARN() is supposed to be for critical issues.

> With
> a slow serial console (pl011 is an nbcon console) and a backlog of
> messages, that flush can outlast the hard lockup threshold, all of it
> with pool_lock held and IRQs disabled, while every other CPU that needs
> to save a new stack trace spins on pool_lock.

Several serial drivers call touch_nmi_watchdog() (such as 8250) to avoid
this issue. Perhaps the pl011 should be doing this as well (at least for
the write_atomic() path)?

> Running out of depot space is an expected condition under heavy debug
> load, not a kernel bug, so report it with pr_warn_once() instead.

This is the key takeaway. WARN() is not appropriate here.

Reviewed-by: John Ogness <john.ogness@xxxxxxxxxxxxx>