From: Joe Perches <joe@perches.com>
To: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
mhocko@suse.cz, pmladek@suse.cz,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 3/3] printk: Remove separate printk_sched buffers and use printk buf instead
Date: Tue, 17 Dec 2013 09:19:27 -0800 [thread overview]
Message-ID: <1387300767.18217.67.camel@joe-AO722> (raw)
In-Reply-To: <1387291691-2224-4-git-send-email-jack@suse.cz>
On Tue, 2013-12-17 at 15:48 +0100, Jan Kara wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
[]
> the
> logbuf_lock must not be held while doing anything that may call into the
> scheduler functions, which includes wake ups. Unfortunately, printk()
> also has a console_sem that it uses, and on release, the
> up(&console_sem) may do a wake up of any pending waiters. This must be
> avoided while holding the logbuf_lock.
[]
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
[]
> @@ -1479,14 +1482,19 @@ asmlinkage int vprintk_emit(int facility, int level,
[]
> + if (level == -2) {
> + level = -1;
> + in_sched = true;
> + }
[]
> int printk_sched(const char *fmt, ...)
> {
[]
> + r = vprintk_emit(0, -2, NULL, 0, fmt, args);
Can you please use a #define instead of the magic number -2?
prev parent reply other threads:[~2013-12-17 17:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 14:48 printk: Cleanup and softlockup avoidance Jan Kara
2013-12-17 14:48 ` [PATCH 1/3] printk: Release lockbuf_lock before calling console_trylock_for_printk() Jan Kara
2013-12-17 14:48 ` [PATCH 2/3] printk: Enable interrupts " Jan Kara
2013-12-17 14:48 ` [PATCH 3/3] printk: Remove separate printk_sched buffers and use printk buf instead Jan Kara
2013-12-17 17:19 ` Joe Perches [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=1387300767.18217.67.camel@joe-AO722 \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.cz \
--cc=pmladek@suse.cz \
--cc=rostedt@goodmis.org \
/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
all inboxes | Powered by JetHome®