From: Joseph Salisbury <joseph.salisbury@canonical.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Herton Krzesinski <herton.krzesinski@canonical.com>,
linux-kernel@vger.kernel.org
Subject: Re: freezer: exec should clear PF_NOFREEZE along with PF_KTHREAD
Date: Thu, 06 Dec 2012 15:44:01 -0500 [thread overview]
Message-ID: <50C10391.4040903@canonical.com> (raw)
In-Reply-To: <20121206124201.GA30705@redhat.com>
On 12/06/2012 07:42 AM, Oleg Nesterov wrote:
> Hi,
>
> (add lkml)
>
> On 12/06, Ben Hutchings wrote:
>> On Wed, 2012-12-05 at 14:13 -0500, Joseph Salisbury wrote:
>>
>>> Hi Oleg,
>>>
>>> A bug was opened against the Ubuntu kernel[0]. It was found that
>>> reverting commit b40a79591ca918e7b91b0d9b6abd5d00f2e88c19 resolved this
>>> bug, and allowed suspend/resume to work properly.
>>>
>>> I see that you are the author of this patch, so I wanted to run it by
>>> you. I was thinking of requesting a revert for 3.2 stable, but I wanted
>>> to get your feedback first.
>>>
>>> Thanks,
>>>
>>> Joe
>>>
>>>
>>> [0] https://bugs.launchpad.net/ubuntu/+source/v86d/+bug/1080530
>> If I understand this rightly:
>> 1. Suspend is aborted because the v86d usermodehelper cannot be frozen.
>> 2. Before this fix, usermodehelpers could inherit PF_NOFREEZE (what
>> could possibly go wrong with that?!), which is why this didn't
>> previously happen.
> Yes, try_to_freeze_tasks() ignores PF_NOFREEZE tasks
>
>> 3. However, usermodehelpers are supposed to be disabled while the
>> freezer is running. Why is this one still running?
> __usermodehelper_disable() doesn't try to kill/stop/whatever the already
> spawned tasks...
>
> The question is, why v86d refuses to freeze? It sleeps in TASK_INTERRUPTIBLE.
>
>
> Oh... I seem to understand. This is 3.2 kernel, it also has PF_FREEZER_NOSIG.
> which should be cleared along with PF_NOFREEZE.
>
> This flag was removed upstream, but the older kernel need the fix. Could
> you test the patch below?
>
> Oleg.
>
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -1084,7 +1084,7 @@ int flush_old_exec(struct linux_binprm *
>
> set_fs(USER_DS);
> current->flags &=
> - ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE);
> + ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE | PF_FREEZER_NOSIG);
> flush_thread();
> current->personality &= ~bprm->per_clear;
>
>
Hi Oleg,
A couple of people have tested your patch and report if fixes the
suspend/resume bug[0]. Thanks for the quick fix! Will you be
requesting this patch in the stable kernels?
Thanks again,
Joe
[0] https://bugs.launchpad.net/bugs/1080530
next prev parent reply other threads:[~2012-12-06 20:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <50BF9CC2.7070705@canonical.com>
[not found] ` <1354762294.17107.157.camel@deadeye.wl.decadent.org.uk>
2012-12-06 12:42 ` Oleg Nesterov
2012-12-06 20:44 ` Joseph Salisbury [this message]
2012-12-07 14:49 ` [PATCH -stable 0/1] freezer: PF_FREEZER_NOSIG should be cleared along with PF_NOFREEZE Oleg Nesterov
2012-12-07 14:49 ` [PATCH -stable 1/1] " Oleg Nesterov
2012-12-09 23:04 ` Ben Hutchings
2012-12-10 20:34 ` Greg Kroah-Hartman
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=50C10391.4040903@canonical.com \
--to=joseph.salisbury@canonical.com \
--cc=ben@decadent.org.uk \
--cc=herton.krzesinski@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=rjw@sisk.pl \
/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
Powered by JetHome