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 1b7512d5a64a..7d4a348ea4f4 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -92,7 +92,7 @@ int nr_processes(void) | |||
92 | int cpu; | 92 | int cpu; |
93 | int total = 0; | 93 | int total = 0; |
94 | 94 | ||
95 | for_each_online_cpu(cpu) | 95 | for_each_possible_cpu(cpu) |
96 | total += per_cpu(process_counts, cpu); | 96 | total += per_cpu(process_counts, cpu); |
97 | 97 | ||
98 | return total; | 98 | return total; |
@@ -572,12 +572,18 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) | |||
572 | 572 | ||
573 | /* Get rid of any futexes when releasing the mm */ | 573 | /* Get rid of any futexes when releasing the mm */ |
574 | #ifdef CONFIG_FUTEX | 574 | #ifdef CONFIG_FUTEX |
575 | if (unlikely(tsk->robust_list)) | 575 | if (unlikely(tsk->robust_list)) { |
576 | exit_robust_list(tsk); | 576 | exit_robust_list(tsk); |
577 | tsk->robust_list = NULL; | ||
578 | } | ||
577 | #ifdef CONFIG_COMPAT | 579 | #ifdef CONFIG_COMPAT |
578 | if (unlikely(tsk->compat_robust_list)) | 580 | if (unlikely(tsk->compat_robust_list)) { |
579 | compat_exit_robust_list(tsk); | 581 | compat_exit_robust_list(tsk); |
582 | tsk->compat_robust_list = NULL; | ||
583 | } | ||
580 | #endif | 584 | #endif |
585 | if (unlikely(!list_empty(&tsk->pi_state_list))) | ||
586 | exit_pi_state_list(tsk); | ||
581 | #endif | 587 | #endif |
582 | 588 | ||
583 | /* Get rid of any cached register state */ | 589 | /* Get rid of any cached register state */ |