]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/exit.c
Merge tag 'iio-fixes-4.19a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
[linux.git] / kernel / exit.c
index c3c7ac5601140961563534441908b52ced5a557c..0e21e6d21f35f884f5b89b4237bd0be4f2b8a085 100644 (file)
@@ -73,6 +73,7 @@ static void __unhash_process(struct task_struct *p, bool group_dead)
        nr_threads--;
        detach_pid(p, PIDTYPE_PID);
        if (group_dead) {
+               detach_pid(p, PIDTYPE_TGID);
                detach_pid(p, PIDTYPE_PGID);
                detach_pid(p, PIDTYPE_SID);
 
@@ -680,7 +681,8 @@ static void forget_original_parent(struct task_struct *father,
                                t->parent = t->real_parent;
                        if (t->pdeath_signal)
                                group_send_sig_info(t->pdeath_signal,
-                                                   SEND_SIG_NOINFO, t);
+                                                   SEND_SIG_NOINFO, t,
+                                                   PIDTYPE_TGID);
                }
                /*
                 * If this is a threaded reparent there is no need to
@@ -1001,14 +1003,6 @@ struct wait_opts {
        int                     notask_error;
 };
 
-static inline
-struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
-{
-       if (type != PIDTYPE_PID)
-               task = task->group_leader;
-       return task->pids[type].pid;
-}
-
 static int eligible_pid(struct wait_opts *wo, struct task_struct *p)
 {
        return  wo->wo_type == PIDTYPE_MAX ||