Commit d68b8622 authored by Roland McGrath's avatar Roland McGrath Committed by Linus Torvalds

[PATCH] i386: fix prevent_tail_call

We fixed this bug before, but it didn't take.  It may have been the case
that the problem was first noticed to occur in a CONFIG_REGPARM compile.
But it's not regparm functions that need not to make tail calls, it's
asmlinkage functions called with a user pt_regs frame on the stack
supplying their arguments.  prevent_tail_call probably doesn't do anything
at all in regparm functions (your argument registers are going to be
clobbered, period).  It was a braino to conditionalize that definition in
the first place.
Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4ec5240e
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
#define FASTCALL(x) x __attribute__((regparm(3))) #define FASTCALL(x) x __attribute__((regparm(3)))
#define fastcall __attribute__((regparm(3))) #define fastcall __attribute__((regparm(3)))
#ifdef CONFIG_REGPARM #define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret))
# define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret))
#endif
#ifdef CONFIG_X86_ALIGNMENT_16 #ifdef CONFIG_X86_ALIGNMENT_16
#define __ALIGN .align 16,0x90 #define __ALIGN .align 16,0x90
......
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