From: Oleg Nesterov <oleg@redhat.com>
To: Silesh C V <svellattu@mvista.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
Mandeep Singh Baines <msb@chromium.org>
Subject: Re: [PATCH] coredump: Fix the setting of PF_DUMPCORE
Date: Fri, 11 Jul 2014 12:35:10 +0200 [thread overview]
Message-ID: <20140711103510.GA2252@redhat.com> (raw)
In-Reply-To: <1405072839-4137-1-git-send-email-svellattu@mvista.com>
OOPS. Thanks a lot Silesh.
Hopefully Andrew can take this patch. And it probably needs
Cc: stable@vger.kernel.org # v3.10+
On 07/11, Silesh C V wrote:
>
> commit 079148b91 (coredump: factor out the setting of PF_DUMPCORE)
> cleaned up the setting of PF_DUMPCORE by removing it from all the
> linux_binfmt->core_dump() and moving it to zap_threads().But this
> ended up clearing all the previously set flags. This causes issues
> during core generation when tsk->flags is checked again
> (eg. for PF_USED_MATH to dump floating point registers). Fix this.
>
> Signed-off-by: Silesh C V <svellattu@mvista.com>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Cc: Mandeep Singh Baines <msb@chromium.org>
>
> ---
> fs/coredump.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/coredump.c b/fs/coredump.c
> index 0b2528f..a93f7e6 100644
> --- a/fs/coredump.c
> +++ b/fs/coredump.c
> @@ -306,7 +306,7 @@ static int zap_threads(struct task_struct *tsk, struct mm_struct *mm,
> if (unlikely(nr < 0))
> return nr;
>
> - tsk->flags = PF_DUMPCORE;
> + tsk->flags |= PF_DUMPCORE;
> if (atomic_read(&mm->mm_users) == nr + 1)
> goto done;
> /*
> --
> 1.8.1.2
>
prev parent reply other threads:[~2014-07-11 10:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 10:00 [PATCH] coredump: Fix the setting of PF_DUMPCORE Silesh C V
2014-07-11 10:35 ` Oleg Nesterov [this message]
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=20140711103510.GA2252@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=msb@chromium.org \
--cc=svellattu@mvista.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox