From dc7b02a1e0e413fb96d22f1d4ef4da98115cfb9d Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Wed, 17 Aug 2011 15:34:29 +0800 Subject: [PATCH] coredump: fix wrong comments on core limits of pipe coredump case In commit 898b374a, core limits recursive check vaule changed from 0 to 1, but the corresponding comments was not changed correctly. Signed-off-by: Jovi Zhang Cc: Oleg Nesterov Cc: Neil Horman --- fs/exec.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/fs/exec.c b/fs/exec.c index 25dcbe5..ba493cc 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -2158,15 +2158,16 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs) } if (cprm.limit == 1) { - /* + /* See umh_pipe_setup() which sets RLIMIT_CORE = 1. + * * Normally core limits are irrelevant to pipes, since * we're not writing to the file system, but we use - * cprm.limit of 1 here as a speacial value. Any - * non-1 limit gets set to RLIM_INFINITY below, but - * a limit of 0 skips the dump. This is a consistent - * way to catch recursive crashes. We can still crash - * if the core_pattern binary sets RLIM_CORE = !1 - * but it runs as root, and can do lots of stupid things + * cprm.limit of 1 here as a speacial value, this is a + * consistent way to catch recursive crashes. + * We can still crash if the core_pattern binary sets + * RLIM_CORE = !1, but it runs as root, and can do + * lots of stupid things. + * * Note that we use task_tgid_vnr here to grab the pid * of the process group leader. That way we get the * right pid if a thread in a multi-threaded -- 1.6.5.2