From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, Richard Weinberger <richard@nod.at>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
Johannes Berg <johannes@sipsolutions.net>,
linux-um@lists.infradead.org
Subject: Re: [PATCH printk v3 09/40] um: kmsg_dump: use console_is_enabled()
Date: Wed, 9 Nov 2022 15:52:57 +0100 [thread overview]
Message-ID: <Y2u+yQca3Y5DzPUc@alley> (raw)
In-Reply-To: <20221107141638.3790965-10-john.ogness@linutronix.de>
On Mon 2022-11-07 15:22:07, John Ogness wrote:
> Replace (console->flags & CON_ENABLED) usage with console_is_enabled().
>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>
> ---
> arch/um/kernel/kmsg_dump.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel/kmsg_dump.c
> index 40abf1e9ccb1..f0233e2f8de0 100644
> --- a/arch/um/kernel/kmsg_dump.c
> +++ b/arch/um/kernel/kmsg_dump.c
> @@ -32,7 +32,7 @@ static void kmsg_dumper_stdout(struct kmsg_dumper *dumper,
> * expected to output the crash information.
> */
> if (strcmp(con->name, "ttynull") != 0 &&
> - (con->flags & CON_ENABLED)) {
> + console_is_enabled(con)) {
The patch does not explain why the racy check is needed here.
I would prefer to merge this patch with the patch switching to the srcu
console list iterator. It will become more or less self-explaining.
Anyway, I agree that the racy check is acceptable here.
Best Regards,
Petr
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
next prev parent reply other threads:[~2022-11-09 14:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 14:15 [PATCH printk v3 00/40] reduce console_lock scope John Ogness
2022-11-07 14:16 ` [PATCH printk v3 06/40] um: kmsg_dump: only dump when no output console available John Ogness
2022-11-08 12:41 ` Petr Mladek
2022-11-07 14:16 ` [PATCH printk v3 09/40] um: kmsg_dump: use console_is_enabled() John Ogness
2022-11-09 14:52 ` Petr Mladek [this message]
2022-11-09 14:56 ` Petr Mladek
2022-11-09 14:57 ` Petr Mladek
2022-11-07 14:16 ` [PATCH printk v3 11/40] um: kmsg_dumper: use srcu console list iterator John Ogness
2022-11-09 15:05 ` Petr Mladek
2022-11-11 14:43 ` [PATCH printk v3 00/40] reduce console_lock scope Mathieu Desnoyers
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=Y2u+yQca3Y5DzPUc@alley \
--to=pmladek@suse.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=johannes@sipsolutions.net \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=richard@nod.at \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).