exit.c (6db840fa7887980ef68a649640d506fe069eef0c) exit.c (42b2dd0a02c512cf59c96f5c227bf54bfe5bbf08)
1/*
2 * linux/kernel/exit.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */
6
7#include <linux/mm.h>
8#include <linux/slab.h>

--- 933 unchanged lines hidden (view full) ---

942 }
943 group_dead = atomic_dec_and_test(&tsk->signal->live);
944 if (group_dead) {
945 exit_child_reaper(tsk);
946 hrtimer_cancel(&tsk->signal->real_timer);
947 exit_itimers(tsk->signal);
948 }
949 acct_collect(code, group_dead);
1/*
2 * linux/kernel/exit.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */
6
7#include <linux/mm.h>
8#include <linux/slab.h>

--- 933 unchanged lines hidden (view full) ---

942 }
943 group_dead = atomic_dec_and_test(&tsk->signal->live);
944 if (group_dead) {
945 exit_child_reaper(tsk);
946 hrtimer_cancel(&tsk->signal->real_timer);
947 exit_itimers(tsk->signal);
948 }
949 acct_collect(code, group_dead);
950#ifdef CONFIG_FUTEX
950 if (unlikely(tsk->robust_list))
951 exit_robust_list(tsk);
951 if (unlikely(tsk->robust_list))
952 exit_robust_list(tsk);
952#if defined(CONFIG_FUTEX) && defined(CONFIG_COMPAT)
953#ifdef CONFIG_COMPAT
953 if (unlikely(tsk->compat_robust_list))
954 compat_exit_robust_list(tsk);
955#endif
954 if (unlikely(tsk->compat_robust_list))
955 compat_exit_robust_list(tsk);
956#endif
957#endif
956 if (group_dead)
957 tty_audit_exit();
958 if (unlikely(tsk->audit_context))
959 audit_free(tsk);
960
961 tsk->exit_code = code;
962 taskstats_exit(tsk, group_dead);
963

--- 18 unchanged lines hidden (view full) ---

982
983 proc_exit_connector(tsk);
984 exit_task_namespaces(tsk);
985 exit_notify(tsk);
986#ifdef CONFIG_NUMA
987 mpol_free(tsk->mempolicy);
988 tsk->mempolicy = NULL;
989#endif
958 if (group_dead)
959 tty_audit_exit();
960 if (unlikely(tsk->audit_context))
961 audit_free(tsk);
962
963 tsk->exit_code = code;
964 taskstats_exit(tsk, group_dead);
965

--- 18 unchanged lines hidden (view full) ---

984
985 proc_exit_connector(tsk);
986 exit_task_namespaces(tsk);
987 exit_notify(tsk);
988#ifdef CONFIG_NUMA
989 mpol_free(tsk->mempolicy);
990 tsk->mempolicy = NULL;
991#endif
992#ifdef CONFIG_FUTEX
990 /*
991 * This must happen late, after the PID is not
992 * hashed anymore:
993 */
994 if (unlikely(!list_empty(&tsk->pi_state_list)))
995 exit_pi_state_list(tsk);
996 if (unlikely(current->pi_state_cache))
997 kfree(current->pi_state_cache);
993 /*
994 * This must happen late, after the PID is not
995 * hashed anymore:
996 */
997 if (unlikely(!list_empty(&tsk->pi_state_list)))
998 exit_pi_state_list(tsk);
999 if (unlikely(current->pi_state_cache))
1000 kfree(current->pi_state_cache);
1001#endif
998 /*
999 * Make sure we are holding no locks:
1000 */
1001 debug_check_no_locks_held(tsk);
1002 /*
1003 * We can do this unlocked here. The futex code uses this flag
1004 * just to verify whether the pi state cleanup has been done
1005 * or not. In the worst case it loops once more.

--- 717 unchanged lines hidden ---
1002 /*
1003 * Make sure we are holding no locks:
1004 */
1005 debug_check_no_locks_held(tsk);
1006 /*
1007 * We can do this unlocked here. The futex code uses this flag
1008 * just to verify whether the pi state cleanup has been done
1009 * or not. In the worst case it loops once more.

--- 717 unchanged lines hidden ---