From d67e03e361619b20c51aaef3b7dd1497617c371d Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Wed, 1 Sep 2021 11:23:38 -0500 Subject: exit: Factor coredump_exit_mm out of exit_mm Separate the coredump logic from the ordinary exit_mm logic by moving the coredump logic out of exit_mm into it's own function coredump_exit_mm. Link: https://lkml.kernel.org/r/87a6k2x277.fsf@disp2133 Reviewed-by: Kees Cook Signed-off-by: "Eric W. Biederman" --- fs/coredump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/coredump.c') diff --git a/fs/coredump.c b/fs/coredump.c index 3224dee44d30..5e0e08a7fb9b 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -404,8 +404,8 @@ static int zap_threads(struct task_struct *tsk, struct mm_struct *mm, * * do_exit: * The caller holds mm->mmap_lock. This means that the task which - * uses this mm can't pass exit_mm(), so it can't exit or clear - * its ->mm. + * uses this mm can't pass coredump_exit_mm(), so it can't exit or + * clear its ->mm. * * de_thread: * It does list_replace_rcu(&leader->tasks, ¤t->tasks), @@ -500,7 +500,7 @@ static void coredump_finish(struct mm_struct *mm, bool core_dumped) next = curr->next; task = curr->task; /* - * see exit_mm(), curr->task must not see + * see coredump_exit_mm(), curr->task must not see * ->task == NULL before we read ->next. */ smp_mb(); -- cgit v1.2.1