public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] proc race on task_struct->sig
@ 2002-03-05 18:54 Chris Mason
  0 siblings, 0 replies; only message in thread
From: Chris Mason @ 2002-03-05 18:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: marcelo


Hello everyone,

I think collect_sigign_sigcatch can race against exit_sighand.
I haven't been able to reproduce it, but I think it causes
the oops reported in the 'Kernel Hangs 2.4.16 on heavy io Oracle
Tivolie TSM' thread.

This patch should fix it:

-chris

--- test.1/fs/proc/array.c Wed, 27 Feb 2002 11:54:30 -0500
+++ test.1(w)/fs/proc/array.c Tue, 05 Mar 2002 11:16:44 -0500
@@ -226,6 +226,7 @@
 	sigemptyset(ign);
 	sigemptyset(catch);
 
+	spin_lock_irq(&p->sigmask_lock);
 	if (p->sig) {
 		k = p->sig->action;
 		for (i = 1; i <= _NSIG; ++i, ++k) {
@@ -235,6 +236,7 @@
 				sigaddset(catch, i);
 		}
 	}
+	spin_unlock_irq(&p->sigmask_lock);
 }
 
 static inline char * task_sig(struct task_struct *p, char *buffer)


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

only message in thread, other threads:[~2002-03-05 18:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-05 18:54 [PATCH] proc race on task_struct->sig Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox