All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>
Cc: andrew+netdev@lunn.ch, edumazet@google.com, kuba@kernel.org,
	 davem@davemloft.net, pabeni@redhat.com,
	john.ogness@linutronix.de,  netdev@vger.kernel.org
Subject: Re: [PATCH] netconsole: Fix compiler warnings when PRINTK_EXECUTION_CTX is disabled
Date: Mon, 9 Mar 2026 05:21:00 -0700	[thread overview]
Message-ID: <aa66vrLUgShSapoP@gmail.com> (raw)
In-Reply-To: <20260309121233.135231-1-chelsyratnawat2001@gmail.com>

Hello Chelsy,

On Mon, Mar 09, 2026 at 05:12:33AM -0700, Chelsy Ratnawat wrote:
> The netconsole change that started using nbcon_write_context for CPU
> and task information assumes CONFIG_PRINTK_EXECUTION_CTX is enabled.

in fact, NETCONSOLE_DYNAMIC selects CONFIG_PRINTK_EXECUTION_CTX. In
other words, were you able to get NETCONSOLE_DYNAMIC without having
CONFIG_PRINTK_EXECUTION_CTX set?

> However, when this option is disabled, struct nbcon_write_context does
> not contain the cpu and comm fields, causing compilation failures:
> 
>   error: 'struct nbcon_write_context' has no member named 'cpu'
>   error: 'struct nbcon_write_context' has no member named 'comm'
> 
> Guard access to these fields and fall back to raw_smp_processor_id()
> and current->comm when PRINTK_EXECUTION_CTX is disabled.

Please don't do it. We want to disable NETCONSOLE_DYNAMIC to be enabled
(thus, not using ->cpu and ->comm) if CONFIG_PRINTK_EXECUTION_CTX is not
set.

Thanks for the report,
--breno

      reply	other threads:[~2026-03-09 12:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 12:12 [PATCH] netconsole: Fix compiler warnings when PRINTK_EXECUTION_CTX is disabled Chelsy Ratnawat
2026-03-09 12:21 ` Breno Leitao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aa66vrLUgShSapoP@gmail.com \
    --to=leitao@debian.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=chelsyratnawat2001@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=john.ogness@linutronix.de \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.