lkml.org 
[lkml]   [2014]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectprintk: One small fixup for patch 5/8

Hello,

this is a small fixup for the patch 5/8 (printk: Hand over printing to
console if printing too long) in my printk series. It fixes a bogus warning
on non-preemptible kernels. Please just fold it into that patch (I can
resend the patch or the series but I don't think that's necessary for such
a small fixup).

Signed-off-by: Jan Kara <jack@suse.cz>

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 0910e1894224..cb7e06850eb5 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2022,7 +2022,7 @@ EXPORT_SYMBOL(console_trylock);
*/
static int console_lock_try_spin(void)
{
- WARN_ON_ONCE(!in_atomic());
+ WARN_ON_ONCE(preemptible());
/* Someone already spinning? Don't waste cpu time... */
if (test_and_set_bit(PRINTK_CONSOLE_SPIN_B, &printk_handover_state))
return 0;

\
 
 \ /
  Last update: 2014-03-19 11:21    [W:0.031 / U:1.288 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site