Re: [PATCH] fix i386 interrupt re-enabling in die()

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

 



On Thu, 8 Sep 2005, Jan Beulich wrote:

> diff -Npru 2.6.13/arch/i386/kernel/traps.c
> 2.6.13-i386-die-irq/arch/i386/kernel/traps.c
> --- 2.6.13/arch/i386/kernel/traps.c	2005-08-29 01:41:01.000000000
> +0200
> +++ 2.6.13-i386-die-irq/arch/i386/kernel/traps.c	2005-09-07
> 11:39:40.000000000 +0200
> @@ -304,6 +304,7 @@ void die(const char * str, struct pt_reg
>  		spinlock_t lock;
>  		u32 lock_owner;
>  		int lock_owner_depth;
> +		unsigned long flags;
>  	} die = {
>  		.lock =			SPIN_LOCK_UNLOCKED,
>  		.lock_owner =		-1,
> @@ -313,7 +314,7 @@ void die(const char * str, struct pt_reg
>  
>  	if (die.lock_owner != raw_smp_processor_id()) {
>  		console_verbose();
> -		spin_lock_irq(&die.lock);
> +		spin_lock_irqsave(&die.lock, die.flags);

This corrupts flags on contention, use a stack variable.
-
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]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux