Commit dc11908a authored by Dave Jones's avatar Dave Jones

[PATCH] proc race on task_struct->sig

Originally from Chris Mason <mason@suse.com>..

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.
parent 4e7e1865
...@@ -227,6 +227,7 @@ static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *ign, ...@@ -227,6 +227,7 @@ static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *ign,
sigemptyset(ign); sigemptyset(ign);
sigemptyset(catch); sigemptyset(catch);
spin_lock_irq(&p->sigmask_lock);
if (p->sig) { if (p->sig) {
k = p->sig->action; k = p->sig->action;
for (i = 1; i <= _NSIG; ++i, ++k) { for (i = 1; i <= _NSIG; ++i, ++k) {
...@@ -236,6 +237,7 @@ static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *ign, ...@@ -236,6 +237,7 @@ static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *ign,
sigaddset(catch, i); sigaddset(catch, i);
} }
} }
spin_unlock_irq(&p->sigmask_lock);
} }
static inline char * task_sig(struct task_struct *p, char *buffer) static inline char * task_sig(struct task_struct *p, char *buffer)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment