diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 266c6af6ef1b..166b8c49257c 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -91,7 +91,7 @@ int nr_processes(void) | |||
91 | int cpu; | 91 | int cpu; |
92 | int total = 0; | 92 | int total = 0; |
93 | 93 | ||
94 | for_each_online_cpu(cpu) | 94 | for_each_possible_cpu(cpu) |
95 | total += per_cpu(process_counts, cpu); | 95 | total += per_cpu(process_counts, cpu); |
96 | 96 | ||
97 | return total; | 97 | return total; |
@@ -570,12 +570,18 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) | |||
570 | 570 | ||
571 | /* Get rid of any futexes when releasing the mm */ | 571 | /* Get rid of any futexes when releasing the mm */ |
572 | #ifdef CONFIG_FUTEX | 572 | #ifdef CONFIG_FUTEX |
573 | if (unlikely(tsk->robust_list)) | 573 | if (unlikely(tsk->robust_list)) { |
574 | exit_robust_list(tsk); | 574 | exit_robust_list(tsk); |
575 | tsk->robust_list = NULL; | ||
576 | } | ||
575 | #ifdef CONFIG_COMPAT | 577 | #ifdef CONFIG_COMPAT |
576 | if (unlikely(tsk->compat_robust_list)) | 578 | if (unlikely(tsk->compat_robust_list)) { |
577 | compat_exit_robust_list(tsk); | 579 | compat_exit_robust_list(tsk); |
580 | tsk->compat_robust_list = NULL; | ||
581 | } | ||
578 | #endif | 582 | #endif |
583 | if (unlikely(!list_empty(&tsk->pi_state_list))) | ||
584 | exit_pi_state_list(tsk); | ||
579 | #endif | 585 | #endif |
580 | 586 | ||
581 | /* Get rid of any cached register state */ | 587 | /* Get rid of any cached register state */ |