• Neil Horman's avatar
    Change how we detect recursive dumps. · 0f7c9b6f
    Neil Horman authored
    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.
    Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
    Reported-by: default avatarEarl 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: default avatarAndrew Morton <akpm@linux-foundation.org>
    0f7c9b6f
exec.c 43.4 KB