
From: Jeff Dike <jdike@addtoit.com>

From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>

Restoring of current->blocked in sys_sigreturn is wrong.
The first (long ) of the mask correctly is fetched from sc->oldmask.
The further longs again come from there, but correctly should be
taken from frame->extramask.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/um/sys-i386/signal.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff -puN arch/um/sys-i386/signal.c~uml-correctly-restore-extramask-in-sigreturn arch/um/sys-i386/signal.c
--- 25/arch/um/sys-i386/signal.c~uml-correctly-restore-extramask-in-sigreturn	Fri Dec  3 13:50:40 2004
+++ 25-akpm/arch/um/sys-i386/signal.c	Fri Dec  3 13:50:40 2004
@@ -307,11 +307,12 @@ long sys_sigreturn(struct pt_regs regs)
 	struct sigframe __user *frame = (struct sigframe *)(sp - 8);
 	sigset_t set;
 	struct sigcontext __user *sc = &frame->sc;
-	unsigned long __user *mask = &sc->oldmask;
+	unsigned long __user *oldmask = &sc->oldmask;
+	unsigned long __user *extramask = frame->extramask;
 	int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long);
 
-	if(copy_from_user(&set.sig[0], mask, sizeof(&set.sig[0])) ||
-	   copy_from_user(&set.sig[1], mask, sig_size))
+	if(copy_from_user(&set.sig[0], oldmask, sizeof(&set.sig[0])) ||
+	   copy_from_user(&set.sig[1], extramask, sig_size))
 		goto segfault;
 
 	sigdelsetmask(&set, ~_BLOCKABLE);
_
