Re: [PATCH] coredump: kill mm->core_done

From: Andrew Morton
Date: Tue Jul 15 2008 - 18:45:44 EST


On Tue, 15 Jul 2008 20:21:50 +0400
Oleg Nesterov <oleg@xxxxxxxxxx> wrote:

> Now that we have core_state->dumper list we can use it to wake up the
> sub-threads waiting for the coredump completion.
>
> This uglifies the code and .text grows by 47 bytes, but otoh mm_struct
> lessens by sizeof(struct completion). Also, with this change we can
> decouple exit_mm() from the coredumping code.

This conflicts with your
coredump-simplify-core_state-nr_threads-calculation.patch

fs/exec.c:

***************
*** 1597,1603 ****
struct completion *vfork_done;
int core_waiters;

- init_completion(&mm->core_done);
init_completion(&core_state->startup);
core_state->dumper.task = tsk;
core_state->dumper.next = NULL;
--- 1597,1602 ----
struct completion *vfork_done;
int core_waiters;

init_completion(&core_state->startup);
core_state->dumper.task = tsk;
core_state->dumper.next = NULL;
***************
*** 1812,1819 ****
argv_free(helper_argv);

current->fsuid = fsuid;
- complete_all(&mm->core_done);
- mm->core_state = NULL;
fail:
return retval;
}
--- 1832,1838 ----
argv_free(helper_argv);

current->fsuid = fsuid;
+ coredump_finish(mm);
fail:
return retval;
}

The second hunk is a bit worrisome. The

mm->core_state = NULL;

isn't there any more.


I have a bad feelnig that I have a coredump patch which should have
been dropped. Can you please check everything?

Current queue:

#
# coredump
#
introduce-pf_kthread-flag.patch
kill-pf_borrowed_mm-in-favour-of-pf_kthread.patch
coredump-zap_threads-must-skip-kernel-threads.patch
coredump-elf_core_dump-skip-kernel-threads.patch
#
coredump-turn-mm-core_startup_done-into-the-pointer-to-struct-core_state.patch
coredump-move-mm-core_waiters-into-struct-core_state.patch
coredump-simplify-core_state-nr_threads-calculation.patch
coredump-turn-core_state-nr_threads-into-atomic_t.patch
coredump-kill-mm-core_done.patch


All at http://userweb.kernel.org/~akpm/mmotm/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/