Re: Linux 2.6.24-rc5 x86 architecture no longer Oopses...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Andrew Morton <[email protected]> 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 <[email protected]>
  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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux