exit: ptrace: shift "reap dead" code from exit_ptrace() to forget_original_parent()
[firefly-linux-kernel-4.4.55.git] / kernel / fork.c
index 9b7d746d6d629c3d9d1c937a677271f027a5fe2b..9ca84189cfc20ad34f6b745c10d753a461b89ee3 100644 (file)
@@ -1022,11 +1022,14 @@ void __cleanup_sighand(struct sighand_struct *sighand)
 {
        if (atomic_dec_and_test(&sighand->count)) {
                signalfd_cleanup(sighand);
+               /*
+                * sighand_cachep is SLAB_DESTROY_BY_RCU so we can free it
+                * without an RCU grace period, see __lock_task_sighand().
+                */
                kmem_cache_free(sighand_cachep, sighand);
        }
 }
 
-
 /*
  * Initialize POSIX timer handling for a thread group.
  */