Commit 1bb858f2 authored by lepton's avatar lepton Committed by Linus Torvalds
Browse files

[PATCH] asm-i386/atomic.h: local_irq_save should be used instead of local_irq_disable

atomic_add_return() if CONFIG_M386 can accidentally enable local interrupts.
Signed-off-by: default avatarLepton Wu <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent ab5703b3
......@@ -183,6 +183,7 @@ static __inline__ int atomic_add_return(int i, atomic_t *v)
int __i;
#ifdef CONFIG_M386
unsigned long flags;
goto no_xadd;
......@@ -196,10 +197,10 @@ static __inline__ int atomic_add_return(int i, atomic_t *v)
#ifdef CONFIG_M386
no_xadd: /* Legacy 386 processor */
__i = atomic_read(v);
atomic_set(v, i + __i);
return i + __i;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment