proc race on task_struct->sig
PATCH 1/1 proc race on task_struct->sig
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
fs/proc/array.c Tue, 05 Mar 2002 11:16:44 -0500 renamed from fs/proc/array.c Wed, 27 Feb 2002 11:54:30 -0500 +2 -0
@@ -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)