Neil Horman 725eae32df exec: make do_coredump() more resilient to recursive crashes
Change how we detect recursive dumps.

Currently we have a mechanism by which we try to compare pathnames of the
crashing process to the core_pattern path.  This is broken for a dozen
reasons, and just doesn't work in any sort of robust way.

I'm replacing it with the use of a 0 RLIMIT_CORE value.  Since helper apps
set RLIMIT_CORE to zero, we don't write out core files for any process
with that particular limit set.  It the core_pattern is a pipe, any
non-zero limit is translated to RLIM_INFINITY.

This allows complete dumps to be captured, but prevents infinite recursion
in the event that the core_pattern process itself crashes.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Earl Chew <earl_chew@agilent.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-24 07:21:00 -07:00
..
2009-09-23 13:03:46 -05:00
2009-09-23 07:39:29 -07:00
2009-09-23 07:39:28 -07:00
2009-09-23 07:39:29 -07:00
2009-09-23 18:13:10 -07:00
2009-09-23 07:39:29 -07:00
2009-09-23 18:13:10 -07:00
2009-09-23 18:13:10 -07:00
2009-09-23 18:13:10 -07:00
2009-09-23 07:39:29 -07:00
2009-09-23 18:13:10 -07:00
2009-09-23 07:39:30 -07:00
2009-09-23 07:39:27 -07:00
2009-09-22 07:17:40 -07:00
2009-09-22 07:17:40 -07:00
2009-09-23 07:39:29 -07:00
2009-09-23 07:39:30 -07:00
2009-09-23 07:39:29 -07:00
2009-09-22 07:17:41 -07:00
2009-09-23 07:39:29 -07:00