diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-05-29 18:05:05 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-05-29 18:05:05 +0400 |
commit | 6715930654e06c4d2e66e718ea159079f71838f4 (patch) | |
tree | 6a0a19fb62f3e99cb5f6bf6c34ae541f7c30fb42 /kernel/exit.c | |
parent | ea3f01f8afd3bc5daff915cc4ea5cc5ea9e7d427 (diff) | |
parent | e490517a039a99d692cb3a5561941b0a5f576172 (diff) | |
download | linux-6715930654e06c4d2e66e718ea159079f71838f4.tar.xz |
Merge commit 'linus/master' into sched-fixes-for-linus
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 1510f78a0ffa..8f6185e69b69 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -126,6 +126,12 @@ static void __exit_signal(struct task_struct *tsk) __unhash_process(tsk); + /* + * Do this under ->siglock, we can race with another thread + * doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals. + */ + flush_sigqueue(&tsk->pending); + tsk->signal = NULL; tsk->sighand = NULL; spin_unlock(&sighand->siglock); @@ -133,7 +139,6 @@ static void __exit_signal(struct task_struct *tsk) __cleanup_sighand(sighand); clear_tsk_thread_flag(tsk,TIF_SIGPENDING); - flush_sigqueue(&tsk->pending); if (sig) { flush_sigqueue(&sig->shared_pending); taskstats_tgid_free(sig); |