patch-2.1.122 linux/kernel/exit.c

Next file: linux/kernel/ksyms.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.121/linux/kernel/exit.c linux/kernel/exit.c
@@ -239,7 +239,11 @@
 	struct signal_struct * sig = tsk->sig;
 
 	if (sig) {
+		unsigned long flags;
+
+		spin_lock_irqsave(&tsk->sigmask_lock, flags);
 		tsk->sig = NULL;
+		spin_unlock_irqrestore(&tsk->sigmask_lock, flags);
 		if (atomic_dec_and_test(&sig->count))
 			kfree(sig);
 	}

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