aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c8
-rw-r--r--kernel/fork.c2
-rw-r--r--kernel/signal.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index f7fa21dbced4..988e232254e9 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -670,16 +670,16 @@ static void exit_mm(struct task_struct * tsk)
670 return; 670 return;
671 /* 671 /*
672 * Serialize with any possible pending coredump. 672 * Serialize with any possible pending coredump.
673 * We must hold mmap_sem around checking core_waiters 673 * We must hold mmap_sem around checking core_state
674 * and clearing tsk->mm. The core-inducing thread 674 * and clearing tsk->mm. The core-inducing thread
675 * will increment core_waiters for each thread in the 675 * will increment ->nr_threads for each thread in the
676 * group with ->mm != NULL. 676 * group with ->mm != NULL.
677 */ 677 */
678 down_read(&mm->mmap_sem); 678 down_read(&mm->mmap_sem);
679 if (mm->core_waiters) { 679 if (mm->core_state) {
680 up_read(&mm->mmap_sem); 680 up_read(&mm->mmap_sem);
681 down_write(&mm->mmap_sem); 681 down_write(&mm->mmap_sem);
682 if (!--mm->core_waiters) 682 if (!--mm->core_state->nr_threads)
683 complete(&mm->core_state->startup); 683 complete(&mm->core_state->startup);
684 up_write(&mm->mmap_sem); 684 up_write(&mm->mmap_sem);
685 685
diff --git a/kernel/fork.c b/kernel/fork.c
index eeaec6893b0d..813d5c89b9d5 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -400,7 +400,7 @@ static struct mm_struct * mm_init(struct mm_struct * mm, struct task_struct *p)
400 INIT_LIST_HEAD(&mm->mmlist); 400 INIT_LIST_HEAD(&mm->mmlist);
401 mm->flags = (current->mm) ? current->mm->flags 401 mm->flags = (current->mm) ? current->mm->flags
402 : MMF_DUMP_FILTER_DEFAULT; 402 : MMF_DUMP_FILTER_DEFAULT;
403 mm->core_waiters = 0; 403 mm->core_state = NULL;
404 mm->nr_ptes = 0; 404 mm->nr_ptes = 0;
405 set_mm_counter(mm, file_rss, 0); 405 set_mm_counter(mm, file_rss, 0);
406 set_mm_counter(mm, anon_rss, 0); 406 set_mm_counter(mm, anon_rss, 0);
diff --git a/kernel/signal.c b/kernel/signal.c
index 39c1706edf03..5c7b7eaa0dc6 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1480,10 +1480,10 @@ static inline int may_ptrace_stop(void)
1480 * is a deadlock situation, and pointless because our tracer 1480 * is a deadlock situation, and pointless because our tracer
1481 * is dead so don't allow us to stop. 1481 * is dead so don't allow us to stop.
1482 * If SIGKILL was already sent before the caller unlocked 1482 * If SIGKILL was already sent before the caller unlocked
1483 * ->siglock we must see ->core_waiters != 0. Otherwise it 1483 * ->siglock we must see ->core_state != NULL. Otherwise it
1484 * is safe to enter schedule(). 1484 * is safe to enter schedule().
1485 */ 1485 */
1486 if (unlikely(current->mm->core_waiters) && 1486 if (unlikely(current->mm->core_state) &&
1487 unlikely(current->mm == current->parent->mm)) 1487 unlikely(current->mm == current->parent->mm))
1488 return 0; 1488 return 0;
1489 1489