From: Andi Kleen <ak@muc.de>

The top level asm in process.c assumed that the section was .text, but that
is not guaranteed in a funit-at-a-time compiler.  It ended up in the setup
section and messed up the argument parsing.  This bug could have hit with
any compiler, it was just plain luck that it worked with newer gcc 3.3 and
3.4.



---

 25-akpm/arch/i386/kernel/process.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -puN arch/i386/kernel/process.c~kernel_thread_helper-section-fix arch/i386/kernel/process.c
--- 25/arch/i386/kernel/process.c~kernel_thread_helper-section-fix	Tue Jan 27 13:00:17 2004
+++ 25-akpm/arch/i386/kernel/process.c	Tue Jan 27 13:00:17 2004
@@ -252,13 +252,15 @@ void show_regs(struct pt_regs * regs)
  * the "args".
  */
 extern void kernel_thread_helper(void);
-__asm__(".align 4\n"
+__asm__(".section .text\n"
+	".align 4\n"
 	"kernel_thread_helper:\n\t"
 	"movl %edx,%eax\n\t"
 	"pushl %edx\n\t"
 	"call *%ebx\n\t"
 	"pushl %eax\n\t"
-	"call do_exit");
+	"call do_exit\n"
+	".previous");
 
 /*
  * Create a kernel thread

_