]> err.no Git - linux-2.6/commit
coredump: format_corename: fix the "core_uses_pid" logic
authorOleg Nesterov <oleg@tv-sign.ru>
Fri, 25 Jul 2008 08:47:47 +0000 (01:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Jul 2008 17:53:40 +0000 (10:53 -0700)
commit565b9b14e7f48131bca58840aa404bbef058fa89
tree7925875b10dae248a9fa887c6881c544f59c6173
parenta94e2d408eaedbd85aae259621d46fafc10479a2
coredump: format_corename: fix the "core_uses_pid" logic

I don't understand why the multi-thread coredump implies the core_uses_pid
behaviour, but we shouldn't use mm->mm_users for that.  This counter can
be incremented by get_task_mm().  Use the valued returned by
coredump_wait() instead.

Also, remove the "const char *pattern" argument, format_corename() can use
core_pattern directly.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/exec.c