diff options
author | Jovi Zhang <bookjovi@gmail.com> | 2012-07-30 17:42:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 20:25:20 -0400 |
commit | 108ceeb020bb3558fe175a3fc8b60fd6c1a2a279 (patch) | |
tree | 26b99cdd883b88e9a9dfba20e4f4481de72c046f | |
parent | 0f20784d4ba3f88ca33b703b23372d8ccf6dbd42 (diff) |
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>
-rw-r--r-- | fs/exec.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -2174,15 +2174,16 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs) | |||
2174 | } | 2174 | } |
2175 | 2175 | ||
2176 | if (cprm.limit == 1) { | 2176 | if (cprm.limit == 1) { |
2177 | /* | 2177 | /* See umh_pipe_setup() which sets RLIMIT_CORE = 1. |
2178 | * | ||
2178 | * Normally core limits are irrelevant to pipes, since | 2179 | * Normally core limits are irrelevant to pipes, since |
2179 | * we're not writing to the file system, but we use | 2180 | * we're not writing to the file system, but we use |
2180 | * cprm.limit of 1 here as a speacial value. Any | 2181 | * cprm.limit of 1 here as a speacial value, this is a |
2181 | * non-1 limit gets set to RLIM_INFINITY below, but | 2182 | * consistent way to catch recursive crashes. |
2182 | * a limit of 0 skips the dump. This is a consistent | 2183 | * We can still crash if the core_pattern binary sets |
2183 | * way to catch recursive crashes. We can still crash | 2184 | * RLIM_CORE = !1, but it runs as root, and can do |
2184 | * if the core_pattern binary sets RLIM_CORE = !1 | 2185 | * lots of stupid things. |
2185 | * but it runs as root, and can do lots of stupid things | 2186 | * |
2186 | * Note that we use task_tgid_vnr here to grab the pid | 2187 | * Note that we use task_tgid_vnr here to grab the pid |
2187 | * of the process group leader. That way we get the | 2188 | * of the process group leader. That way we get the |
2188 | * right pid if a thread in a multi-threaded | 2189 | * right pid if a thread in a multi-threaded |