From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Li Zhong <floridsleeves@gmail.com>
Cc: linux-kernel@vger.kernel.org, tony.luck@intel.com,
ccross@android.com, anton@enomsg.org, keescook@chromium.org,
john.ogness@linutronix.de, rostedt@goodmis.org,
senozhatsky@chromium.org, pmladek@suse.com
Subject: Re: [PATCH v1] kernel/printk: check return value of console_trylock()
Date: Sun, 18 Sep 2022 22:11:29 +0900 [thread overview]
Message-ID: <YycYDn82QQZYfpsl@google.com> (raw)
In-Reply-To: <20220917015852.3833820-1-floridsleeves@gmail.com>
On (22/09/16 18:58), Li Zhong wrote:
> Check the console_trylock() return value in case it fails.
[..]
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index a1a81fd9889b..2c6a0484315b 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2937,7 +2937,8 @@ void console_flush_on_panic(enum con_flush_mode mode)
> * context and we don't want to get preempted while flushing,
> * ensure may_schedule is cleared.
> */
> - console_trylock();
> + if (!console_trylock())
> + return;
It supposed to be ignored and the comment above (in the code)
explains why: this is panic flush, we want to proceed regardless.
next prev parent reply other threads:[~2022-09-18 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-17 1:58 [PATCH v1] kernel/printk: check return value of console_trylock() Li Zhong
2022-09-18 13:11 ` Sergey Senozhatsky [this message]
2022-09-19 22:28 ` Li Zhong
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=YycYDn82QQZYfpsl@google.com \
--to=senozhatsky@chromium.org \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=floridsleeves@gmail.com \
--cc=john.ogness@linutronix.de \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=tony.luck@intel.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.