patch-2.1.68 linux/arch/i386/kernel/ptrace.c

Next file: linux/arch/i386/kernel/signal.c
Previous file: linux/arch/i386/kernel/entry.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.67/linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
@@ -492,7 +492,7 @@
 			long tmp;
 
 			ret = -EIO;
-			if ((unsigned long) data > NSIG)
+			if ((unsigned long) data > _NSIG)
 				goto out;
 			if (request == PTRACE_SYSCALL)
 				child->flags |= PF_TRACESYS;
@@ -530,7 +530,7 @@
 			long tmp;
 
 			ret = -EIO;
-			if ((unsigned long) data > NSIG)
+			if ((unsigned long) data > _NSIG)
 				goto out;
 			child->flags &= ~PF_TRACESYS;
 			tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG;
@@ -546,7 +546,7 @@
 			long tmp;
 
 			ret = -EIO;
-			if ((unsigned long) data > NSIG)
+			if ((unsigned long) data > _NSIG)
 				goto out;
 			child->flags &= ~(PF_PTRACED|PF_TRACESYS);
 			wake_up_process(child);
@@ -585,9 +585,7 @@
 	 * stopping signal is not SIGTRAP.  -brl
 	 */
 	if (current->exit_code) {
-		spin_lock_irq(&current->sigmask_lock);
-		current->signal |= (1 << (current->exit_code - 1));
-		spin_unlock_irq(&current->sigmask_lock);
+		send_sig(current->exit_code, current, 1);
+		current->exit_code = 0;
 	}
-	current->exit_code = 0;
 }

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