Re: [PATCH v2] printk: nbcon: Check for device_{lock,unlock} callbacks

From: John Ogness

Date: Mon Dec 08 2025 - 09:53:51 EST


On 2025-12-08, Marcos Paulo de Souza <mpdesouza@xxxxxxxx> wrote:
> These callbacks are necessary to synchronize ->write_thread callback
> against other operations using the same device.
>
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@xxxxxxxx>
> ---
> I found this issue while creating a custom kernel module that implements
> the nbcon interfaces.
> ---
> Changes in v2:
> - Merged the checks device locks with write_thread check, suggested by John.
> - Link to v1: https://patch.msgid.link/20251205-nbcon-device-cb-fix-v1-1-906bdff5760b@xxxxxxxx
> ---

Thanks!

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