[PATCH] fix i386 mutex fastpath on FRAME_POINTER && !DEBUG_MUTEXES
Call the mutex slowpath more conservatively - e.g. FRAME_POINTERS can change the calling convention, in which case a direct branch to the slowpath becomes illegal. Bug found by Hugh Dickins. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
042c904c3e
commit
73165b88ff
@@ -28,7 +28,13 @@ do { \
|
||||
\
|
||||
__asm__ __volatile__( \
|
||||
LOCK " decl (%%eax) \n" \
|
||||
" js "#fail_fn" \n" \
|
||||
" js 2f \n" \
|
||||
"1: \n" \
|
||||
\
|
||||
LOCK_SECTION_START("") \
|
||||
"2: call "#fail_fn" \n" \
|
||||
" jmp 1b \n" \
|
||||
LOCK_SECTION_END \
|
||||
\
|
||||
:"=a" (dummy) \
|
||||
: "a" (count) \
|
||||
@@ -78,7 +84,13 @@ do { \
|
||||
\
|
||||
__asm__ __volatile__( \
|
||||
LOCK " incl (%%eax) \n" \
|
||||
" jle "#fail_fn" \n" \
|
||||
" jle 2f \n" \
|
||||
"1: \n" \
|
||||
\
|
||||
LOCK_SECTION_START("") \
|
||||
"2: call "#fail_fn" \n" \
|
||||
" jmp 1b \n" \
|
||||
LOCK_SECTION_END \
|
||||
\
|
||||
:"=a" (dummy) \
|
||||
: "a" (count) \
|
||||
|
Reference in New Issue
Block a user