]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/mips/kernel/process.c
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
[karo-tx-linux.git] / arch / mips / kernel / process.c
index 902e7803fcfa4a38c7ed8b47c611db290cd41931..3be4405c2d14570bdc04f52206f1cefa278c92a0 100644 (file)
@@ -156,7 +156,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
        *childregs = *regs;
        childregs->regs[7] = 0; /* Clear error flag */
        childregs->regs[2] = 0; /* Child gets zero as return value */
-       childregs->regs[29] = usp;
+       if (usp)
+               childregs->regs[29] = usp;
        ti->addr_limit = USER_DS;
 
        p->thread.reg29 = (unsigned long) childregs;