]> exis.tech > repos - linux.git/blobdiff - kernel/exit.c
Merge tag 'hwmon-for-v7.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
[linux.git] / kernel / exit.c
index 1056422bc1013e0179a0dab5e5c98e377cfe82e2..2c0b1c02920f467d4bdf32d425a11c8ad637c2b5 100644 (file)
@@ -212,7 +212,12 @@ static void __exit_signal(struct release_task_post *post, struct task_struct *ts
        __unhash_process(post, tsk, group_dead);
        write_sequnlock(&sig->stats_lock);
 
-       tsk->sighand = NULL;
+       /*
+        * Ensure that all preceeding state is visible. Pairs with
+        * the smp_acquire__after_ctrl_dep() in the sighand == NULL
+        * path of lock_task_sighand().
+        */
+       smp_store_release(&tsk->sighand, NULL);
        spin_unlock(&sighand->siglock);
 
        __cleanup_sighand(sighand);