All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jovi Zhang <bookjovi@gmail.com>
To: Neil Horman <nhorman@tuxdriver.com>, akpm@linux-foundation.org
Cc: "Oleg Nesterov" <oleg@redhat.com>,
	"Pádraig Brady" <P@draigbrady.com>,
	dhowells@redhat.com, viro@zeniv.linux.org.uk,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] coredump: fix pipe coredump when core limit is 0
Date: Sat, 7 Jul 2012 19:35:34 +0800	[thread overview]
Message-ID: <CACV3sb+Ty_VCdn5-Z-rFAsNxTk2wsw0n7atqhNZGWgqwb1TsYA@mail.gmail.com> (raw)
In-Reply-To: <CACV3sbKHdzYEwap2r_o+4ccYAZU67qPkBYgQwNv3paDq8WJrnQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

Hi Andrew,

Is that attached patch ok to go through your -mm tree? this patch
reviewed many months ago, but still not goto mainstream. :)

that comments is quite mismatch with the code.

Thanks.

.jovi

[-- Attachment #2: 0001-coredump-fix-wrong-comments-on-core-limits-of-pipe-c.patch --]
[-- Type: application/octet-stream, Size: 1761 bytes --]

From dc7b02a1e0e413fb96d22f1d4ef4da98115cfb9d Mon Sep 17 00:00:00 2001
From: Jovi Zhang <bookjovi@gmail.com>
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 <bookjovi@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
---
 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


  reply	other threads:[~2012-07-07 11:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-21 22:36 [PATCH] coredump: fix pipe coredump when core limit is 0 Neil Horman
2011-08-22 13:23 ` Jovi Zhang
2011-08-22 13:27   ` Oleg Nesterov
2011-08-22 15:32 ` Pádraig Brady
2011-08-22 16:19   ` Oleg Nesterov
2011-08-24 10:14     ` Jovi Zhang
2011-08-24 10:17       ` Jovi Zhang
2011-08-24 11:01       ` Neil Horman
2011-08-25 10:03         ` Pádraig Brady
2011-08-25 10:55           ` Neil Horman
2011-08-26  9:15             ` Pádraig Brady
2011-08-25 15:57         ` Oleg Nesterov
2011-08-25 18:43           ` Neil Horman
2011-08-26 14:11             ` Oleg Nesterov
2011-08-26 15:39               ` Neil Horman
2011-08-26  9:09           ` Pádraig Brady
2011-08-26 14:10             ` Oleg Nesterov
2011-11-14  5:49         ` Jovi Zhang
2012-07-07 11:35           ` Jovi Zhang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-08-21 11:25 bookjovi
2011-08-21 15:25 ` Oleg Nesterov
2011-08-21 15:57   ` Oleg Nesterov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACV3sb+Ty_VCdn5-Z-rFAsNxTk2wsw0n7atqhNZGWgqwb1TsYA@mail.gmail.com \
    --to=bookjovi@gmail.com \
    --cc=P@draigbrady.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=oleg@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.