tracing: instance_rmdir() leaks ftrace_event_file->filter
[platform/adaptation/renesas_rcar/renesas_kernel.git] / kernel / exit.c
index 5281522..81b3d67 100644 (file)
@@ -791,6 +791,8 @@ void do_exit(long code)
        exit_shm(tsk);
        exit_files(tsk);
        exit_fs(tsk);
+       if (group_dead)
+               disassociate_ctty(1);
        exit_task_namespaces(tsk);
        exit_task_work(tsk);
        check_stack_usage();
@@ -806,13 +808,9 @@ void do_exit(long code)
 
        cgroup_exit(tsk, 1);
 
-       if (group_dead)
-               disassociate_ctty(1);
-
        module_put(task_thread_info(tsk)->exec_domain->module);
 
        proc_exit_connector(tsk);
-
        /*
         * FIXME: do that only when needed, using sched_exit tracepoint
         */