diff options
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index e93691e9b325..c6d14b8008dd 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/pid_namespace.h> | 24 | #include <linux/pid_namespace.h> |
25 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
26 | #include <linux/profile.h> | 26 | #include <linux/profile.h> |
27 | #include <linux/signalfd.h> | ||
27 | #include <linux/mount.h> | 28 | #include <linux/mount.h> |
28 | #include <linux/proc_fs.h> | 29 | #include <linux/proc_fs.h> |
29 | #include <linux/kthread.h> | 30 | #include <linux/kthread.h> |
@@ -83,6 +84,14 @@ static void __exit_signal(struct task_struct *tsk) | |||
83 | sighand = rcu_dereference(tsk->sighand); | 84 | sighand = rcu_dereference(tsk->sighand); |
84 | spin_lock(&sighand->siglock); | 85 | spin_lock(&sighand->siglock); |
85 | 86 | ||
87 | /* | ||
88 | * Notify that this sighand has been detached. This must | ||
89 | * be called with the tsk->sighand lock held. Also, this | ||
90 | * access tsk->sighand internally, so it must be called | ||
91 | * before tsk->sighand is reset. | ||
92 | */ | ||
93 | signalfd_detach_locked(tsk); | ||
94 | |||
86 | posix_cpu_timers_exit(tsk); | 95 | posix_cpu_timers_exit(tsk); |
87 | if (atomic_dec_and_test(&sig->count)) | 96 | if (atomic_dec_and_test(&sig->count)) |
88 | posix_cpu_timers_exit_group(tsk); | 97 | posix_cpu_timers_exit_group(tsk); |