[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071221004416.GA15922@elte.hu>
Date: Fri, 21 Dec 2007 01:44:16 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: trond.myklebust@....uio.no, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, linux-kernel@...r.kernel.org
Subject: Re: Linux 2.6.24-rc5 x86 architecture no longer Oopses...
* Andrew Morton <akpm@...ux-foundation.org> wrote:
> > + raw_local_irq_save(flags);
> > __raw_spin_lock(&die.lock);
> > - raw_local_save_flags(flags);
> > die.lock_owner = smp_processor_id();
> > die.lock_owner_depth = 0;
> > bust_spinlocks(1);
> > - }
> > - else
> > - raw_local_save_flags(flags);
> > + } else
> > + raw_local_irq_save(flags);
> >
> > if (++die.lock_owner_depth < 3) {
> > unsigned long esp;
>
> Looks sane.
>
> I suppose there's some reason why we can't just use
> spin_lock_irqsave(). But that reason was either so obvious or so
> unimportant that a comment was not needed. Sigh.
bug was introduced via:
commit 39743c9ef717fd4f2b5583f010115c5f2482b8ae
Author: Andi Kleen <ak@...e.de>
Date: Fri Oct 19 20:35:03 2007 +0200
x86: use raw locks during oopses
- spin_lock_irqsave(&die.lock, flags);
+ __raw_spin_lock(&die.lock);
+ raw_local_save_flags(flags);
that is not a correct open-coding of spin_lock_irqsave(): both the
ordering is wrong (irqs should be disabled _first_), and the wrong
flags-saving API was used.
so this is a post-2.6.23 regression and the fix is (now) obvious.
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