From: Oleg Nesterov <oleg@redhat.com>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Tejun Heo <tj@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Pavel Machek <pavel@ucw.cz>,
linux-pm@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] coredump: fix unfreezable coredumping task
Date: Fri, 30 Sep 2016 14:47:41 +0200 [thread overview]
Message-ID: <20160930124741.GA10356@redhat.com> (raw)
In-Reply-To: <1475225434-3753-1-git-send-email-aryabinin@virtuozzo.com>
On 09/30, Andrey Ryabinin wrote:
>
> @@ -423,7 +424,9 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
> if (core_waiters > 0) {
> struct core_thread *ptr;
>
> + freezer_do_not_count();
> wait_for_completion(&core_state->startup);
> + freezer_count();
Agreed... we could probably even do
--- x/fs/coredump.c
+++ x/fs/coredump.c
@@ -423,7 +423,13 @@ static int coredump_wait(int exit_code,
if (core_waiters > 0) {
struct core_thread *ptr;
- wait_for_completion(&core_state->startup);
+ if (wait_for_completion_interruptible(&core_state->startup)) {
+ /* see the comment in dump_interrupted() */
+ down_write(&mm->mmap_sem);
+ coredump_finish(mm, false);
+ up_write(&mm->mmap_sem);
+ return -EINTR;
+ }
/*
* Wait for all the threads to become inactive, so that
* all the thread context (extended register state, like
but this change looks fine to me too.
Acked-by: Oleg Nesterov <oleg@redhat.com>
next prev parent reply other threads:[~2016-09-30 12:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 8:50 [PATCH] coredump: fix unfreezable coredumping task Andrey Ryabinin
2016-09-30 8:50 ` Andrey Ryabinin
2016-09-30 9:01 ` Andrey Ryabinin
2016-09-30 9:01 ` Andrey Ryabinin
2016-09-30 12:47 ` Oleg Nesterov [this message]
2016-10-04 7:18 ` Michal Hocko
2016-10-04 16:13 ` Oleg Nesterov
2016-10-05 9:17 ` Michal Hocko
2016-10-03 9:41 ` Pavel Machek
2016-11-07 16:27 ` Andrey Ryabinin
2016-11-07 16:27 ` Andrey Ryabinin
2016-11-07 22:26 ` Andrew Morton
2016-11-07 22:26 ` Andrew Morton
2016-11-08 9:36 ` Andrey Ryabinin
2016-11-08 9:36 ` Andrey Ryabinin
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=20160930124741.GA10356@redhat.com \
--to=oleg@redhat.com \
--cc=aryabinin@virtuozzo.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=stable@vger.kernel.org \
--cc=tj@kernel.org \
--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.