lkml.org 
[lkml]   [2011]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] printk: Avoid all wakeups from printk

* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> On Thu, 2011-06-09 at 15:55 +0200, Ingo Molnar wrote:
>
> > > @@ -943,19 +939,14 @@ asmlinkage int vprintk(const char *fmt,
> > > if (*p == '\n')
> > > new_text_line = 1;
> > > }
> > > + printk_cpu = UINT_MAX;
> > > + spin_unlock(&logbuf_lock);
> >
> > Hm, is that printk_cpu setting inside the critical section safe? What
> > happens if we get an NMI on this CPU in that window?
>
> That's what the old code did, also NMI really shouldn't printk(), but
> yeah, can flip those two lines, but in that same vein I should also flip
> the setting of that variable with acquiring the lock.

Flipping it won't be enough - we could override another CPU's
protection ...

Thanks,

Ingo


\
 
 \ /
  Last update: 2011-06-09 16:23    [W:0.075 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site