linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] UML - correctly restore extramask in sigreturn
@ 2004-12-03 21:45 Jeff Dike
  0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2004-12-03 21:45 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Blaisorblade, Bodo Stroesser

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>

Index: 2.6.9/arch/um/sys-i386/signal.c
===================================================================
--- 2.6.9.orig/arch/um/sys-i386/signal.c	2004-12-01 14:03:31.000000000 -0500
+++ 2.6.9/arch/um/sys-i386/signal.c	2004-12-01 14:10:26.000000000 -0500
@@ -307,11 +307,12 @@
 	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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-12-03 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-03 21:45 [PATCH] UML - correctly restore extramask in sigreturn Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).