diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/exit.c | 6 | ||||
-rw-r--r-- | kernel/fork.c | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 4c108df88a37..2c704c86edb3 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -947,12 +947,14 @@ fastcall NORET_TYPE void do_exit(long code) | |||
947 | exit_itimers(tsk->signal); | 947 | exit_itimers(tsk->signal); |
948 | } | 948 | } |
949 | acct_collect(code, group_dead); | 949 | acct_collect(code, group_dead); |
950 | #ifdef CONFIG_FUTEX | ||
950 | if (unlikely(tsk->robust_list)) | 951 | if (unlikely(tsk->robust_list)) |
951 | exit_robust_list(tsk); | 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 | if (unlikely(tsk->compat_robust_list)) |
954 | compat_exit_robust_list(tsk); | 955 | compat_exit_robust_list(tsk); |
955 | #endif | 956 | #endif |
957 | #endif | ||
956 | if (group_dead) | 958 | if (group_dead) |
957 | tty_audit_exit(); | 959 | tty_audit_exit(); |
958 | if (unlikely(tsk->audit_context)) | 960 | if (unlikely(tsk->audit_context)) |
@@ -987,6 +989,7 @@ fastcall NORET_TYPE void do_exit(long code) | |||
987 | mpol_free(tsk->mempolicy); | 989 | mpol_free(tsk->mempolicy); |
988 | tsk->mempolicy = NULL; | 990 | tsk->mempolicy = NULL; |
989 | #endif | 991 | #endif |
992 | #ifdef CONFIG_FUTEX | ||
990 | /* | 993 | /* |
991 | * This must happen late, after the PID is not | 994 | * This must happen late, after the PID is not |
992 | * hashed anymore: | 995 | * hashed anymore: |
@@ -995,6 +998,7 @@ fastcall NORET_TYPE void do_exit(long code) | |||
995 | exit_pi_state_list(tsk); | 998 | exit_pi_state_list(tsk); |
996 | if (unlikely(current->pi_state_cache)) | 999 | if (unlikely(current->pi_state_cache)) |
997 | kfree(current->pi_state_cache); | 1000 | kfree(current->pi_state_cache); |
1001 | #endif | ||
998 | /* | 1002 | /* |
999 | * Make sure we are holding no locks: | 1003 | * Make sure we are holding no locks: |
1000 | */ | 1004 | */ |
diff --git a/kernel/fork.c b/kernel/fork.c index 8a97e92c604f..3e764f6f2be1 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1156,13 +1156,14 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1156 | * Clear TID on mm_release()? | 1156 | * Clear TID on mm_release()? |
1157 | */ | 1157 | */ |
1158 | p->clear_child_tid = (clone_flags & CLONE_CHILD_CLEARTID) ? child_tidptr: NULL; | 1158 | p->clear_child_tid = (clone_flags & CLONE_CHILD_CLEARTID) ? child_tidptr: NULL; |
1159 | #ifdef CONFIG_FUTEX | ||
1159 | p->robust_list = NULL; | 1160 | p->robust_list = NULL; |
1160 | #ifdef CONFIG_COMPAT | 1161 | #ifdef CONFIG_COMPAT |
1161 | p->compat_robust_list = NULL; | 1162 | p->compat_robust_list = NULL; |
1162 | #endif | 1163 | #endif |
1163 | INIT_LIST_HEAD(&p->pi_state_list); | 1164 | INIT_LIST_HEAD(&p->pi_state_list); |
1164 | p->pi_state_cache = NULL; | 1165 | p->pi_state_cache = NULL; |
1165 | 1166 | #endif | |
1166 | /* | 1167 | /* |
1167 | * sigaltstack should be cleared when sharing the same VM | 1168 | * sigaltstack should be cleared when sharing the same VM |
1168 | */ | 1169 | */ |