[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110609141959.GF21100@elte.hu>
Date: Thu, 9 Jun 2011 16:19:59 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
efault@....de, Arne Jansen <lists@...-jansens.de>
Subject: Re: [PATCH 3/3] printk: Avoid all wakeups from printk
* Peter Zijlstra <a.p.zijlstra@...llo.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
--
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