On Tue, 2013-12-17 at 15:48 +0100, Jan Kara wrote:
> From: Steven Rostedt <rost...@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?


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to