Messages in this thread | | | Subject | Re: [PATCH 3/3] printk: Remove separate printk_sched buffers and use printk buf instead | From | Joe Perches <> | Date | Tue, 17 Dec 2013 09:19:27 -0800 |
| |
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?
| |