Re: [PATCH v2] pstore/zone: Emit registration message as a single pr_info()

From: Kartik Rajput

Date: Thu Jun 04 2026 - 01:17:08 EST


Hi Kees,

On 26/04/26 14:39, Kartik Rajput wrote:
register_pstore_zone() prints its "registered ... as backend for ..."
summary as a pr_info() followed by several pr_cont() calls.

pr_cont() is not atomic and has no log level of its own. It appends
to whichever line was most recently opened by a printk(). If a
pr_err() or pr_warn() from another CPU or an interrupt handler
preempts the pr_info() / pr_cont() sequence, it closes the
continuation between the fragments. This can cause parts of the
pstore registration message to appear at the wrong log level and be
interleaved with other messages.

Furthermore, this causes the detection of new warning and error
messages in the kernel log to be unreliable.

Format the registration line into a seq_buf and emit it with a
single pr_info() call, making the line atomic with respect to
concurrent printk() callers. No functional change to registration.

Signed-off-by: Kartik Rajput <kkartik@xxxxxxxxxx>
---
Changes in v2:
- Use a seq_buf to build the registration line instead of scnprintf()
calls.
- Link to v1: https://lore.kernel.org/all/20260424095820.1433700-1-kkartik@xxxxxxxxxx/
---
Just following up on this patch. Did you get a chance to review this?

Thanks,
Kartik