[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1387300767.18217.67.camel@joe-AO722>
Date: Tue, 17 Dec 2013 09:19:27 -0800
From: Joe Perches <joe@...ches.com>
To: Jan Kara <jack@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>, mhocko@...e.cz,
pmladek@...e.cz, Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH 3/3] printk: Remove separate printk_sched buffers and
use printk buf instead
On Tue, 2013-12-17 at 15:48 +0100, Jan Kara wrote:
> From: Steven Rostedt <rostedt@...dmis.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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists