The patch titled update coredump path in kernel to not check coredump rlim if core_pattern is a pipe has been removed from the -mm tree. Its filename was update-coredump-path-in-kernel-to-not-check-coredump-rlim-if-core_pattern-is-a-pipe.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ Subject: update coredump path in kernel to not check coredump rlim if core_pattern is a pipe From: Neil Horman <nhorman@xxxxxxxxxxxxx> Update do_coredump such that it ignores RLIMIT_CORE in the event that core_pattern is a pipe. RLIMIT_CORE is meant to prevent dumping cores that are to large for the filesystem they are being written to for a given user id. If the core_pattern points to a pipe, the core isn't written to disk, but rather sent to a spawned reader utility, negating the need for the check. If the pipe reader later decides to write the core to disk, the reading process is bound by the quotas and permissions that the target filesystem has set on it. Signed-off-by: Neil Horman <nhorman@xxxxxxxxxxxxx> Cc: Hidehiro Kawai <hidehiro.kawai.ez@xxxxxxxxxxx> Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> Cc: Andi Kleen <ak@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/exec.c | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff -puN fs/exec.c~update-coredump-path-in-kernel-to-not-check-coredump-rlim-if-core_pattern-is-a-pipe fs/exec.c --- a/fs/exec.c~update-coredump-path-in-kernel-to-not-check-coredump-rlim-if-core_pattern-is-a-pipe +++ a/fs/exec.c @@ -1759,9 +1759,6 @@ int do_coredump(long signr, int exit_cod */ clear_thread_flag(TIF_SIGPENDING); - if (current->signal->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump) - goto fail_unlock; - /* * lock_kernel() because format_corename() is controlled by sysctl, which * uses lock_kernel() @@ -1769,6 +1766,19 @@ int do_coredump(long signr, int exit_cod lock_kernel(); ispipe = format_corename(corename, core_pattern, signr); unlock_kernel(); + + /* + * Don't bother to check the RLIMIT_CORE value if core_pattern points + * to a pipe. Since we're not writing directly to the filesystem + * RLIMIT_CORE doesn't really apply, as no actual core file will be + * created unless the pipe reader choses to write out the core file + * at which point file size limits and permissions will be imposed + * as it does with any other process + */ + if ((!ispipe) && + (current->signal->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump)) + goto fail_unlock; + if (ispipe) { /* SIGPIPE can happen, but it's just never processed */ if(call_usermodehelper_pipe(corename+1, NULL, NULL, &file)) { _ Patches currently in -mm which might be from nhorman@xxxxxxxxxxxxx are update-coredump-path-in-kernel-to-not-check-coredump-rlim-if-core_pattern-is-a-pipe.patch allow-individual-core-dump-methods-to-be-unlimited-when-sending-to-a-pipe.patch allow-individual-core-dump-methods-to-be-unlimited-when-sending-to-a-pipe-fix.patch allow-individual-core-dump-methods-to-be-unlimited-when-sending-to-a-pipe-sparc64-fix.patch allow-individual-core-dump-methods-to-be-unlimited-when-sending-to-a-pipe-fix-2.patch allow-individual-core-dump-methods-to-be-unlimited-when-sending-to-a-pipe-fix-2-fix.patch allow-individual-core-dump-methods-to-be-unlimited-when-sending-to-a-pipe-fix-2-sparc64-fix.patch allow-individual-core-dump-methods-to-be-unlimited-when-sending-to-a-pipe-binfmt_flat-fix.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html