summaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorJovi Zhang <bookjovi@gmail.com>2012-07-30 14:42:23 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 17:25:20 -0700
commit108ceeb020bb3558fe175a3fc8b60fd6c1a2a279 (patch)
tree26b99cdd883b88e9a9dfba20e4f4481de72c046f /fs/exec.c
parent0f20784d4ba3f88ca33b703b23372d8ccf6dbd42 (diff)
downloadlinux-stable-108ceeb020bb3558fe175a3fc8b60fd6c1a2a279.tar.gz
linux-stable-108ceeb020bb3558fe175a3fc8b60fd6c1a2a279.tar.bz2
linux-stable-108ceeb020bb3558fe175a3fc8b60fd6c1a2a279.zip
coredump: fix wrong comments on core limits of pipe coredump case
In commit 898b374af6f7 ("exec: replace call_usermodehelper_pipe with use of umh init function and resolve limit"), the core limits recursive check value was changed from 0 to 1, but the corresponding comments were not updated. Signed-off-by: Jovi Zhang <bookjovi@gmail.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 5af8390e0fae..3684353ebd5f 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -2174,15 +2174,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