patch-2.1.4 linux/kernel/signal.c

Next file: linux/kernel/sys.c
Previous file: linux/kernel/sched.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.3/linux/kernel/signal.c linux/kernel/signal.c
@@ -35,7 +35,8 @@
 		error = verify_area(VERIFY_READ, set, sizeof(sigset_t));
 		if (error)
 			return error;
-		new_set = get_user(set) & _BLOCKABLE;
+		get_user(new_set, set);
+		new_set &= _BLOCKABLE;
 		switch (how) {
 		case SIG_BLOCK:
 			current->blocked |= new_set;
@@ -161,7 +162,7 @@
 			return err;
 		if (signum==SIGKILL || signum==SIGSTOP)
 			return -EINVAL;
-		memcpy_fromfs(&new_sa, action, sizeof(struct sigaction));
+		copy_from_user(&new_sa, action, sizeof(struct sigaction));
 		if (new_sa.sa_handler != SIG_DFL && new_sa.sa_handler != SIG_IGN) {
 			err = verify_area(VERIFY_READ, new_sa.sa_handler, 1);
 			if (err)
@@ -172,7 +173,7 @@
 		int err = verify_area(VERIFY_WRITE, oldaction, sizeof(*oldaction));
 		if (err)
 			return err;
-		memcpy_tofs(oldaction, p, sizeof(struct sigaction));
+		copy_to_user(oldaction, p, sizeof(struct sigaction));
 	}
 	if (action) {
 		*p = new_sa;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov