LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Aneesh Kumar" <aneesh.kumar@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Andrew Morton" <akpm@osdl.org>,
"Oleg Nesterov" <oleg@tv-sign.ru>, "Pavel Machek" <pavel@ucw.cz>,
"Srivatsa Vaddagiri" <vatsa@in.ibm.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
"Gautham R Shenoy" <ego@in.ibm.com>
Subject: Re: [RFC][PATCH 3/3] Freezer: Prevent ___call_usermodehelper from missing freezing requests
Date: Mon, 26 Feb 2007 19:30:55 +0100 [thread overview]
Message-ID: <200702261930.56550.rjw@sisk.pl> (raw)
In-Reply-To: <cc723f590702260358u7b9da770v42964d534182ee4d@mail.gmail.com>
On Monday, 26 February 2007 12:58, Aneesh Kumar wrote:
> On 2/26/07, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > NOTE: Alternatively, we can just drop flush_signals() from there, but I'm not
> > sure that's the right thing to do.
> >
> > ---
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > Since ____call_usermodehelper() calls flush_signals(current), the task that
> > enters it may miss a freezing request. However, if ____call_usermodehelper()
> > clears TIF_FREEZE for the current task after flush_signals(current) returns, the
> > freezer will generate one more freezing request for this task.
> >
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > ---
> > kernel/kmod.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > Index: linux-2.6.20-mm2/kernel/kmod.c
> > ===================================================================
> > --- linux-2.6.20-mm2.orig/kernel/kmod.c 2007-02-25 12:07:15.000000000 +0100
> > +++ linux-2.6.20-mm2/kernel/kmod.c 2007-02-25 12:49:16.000000000 +0100
> > @@ -34,6 +34,7 @@
> > #include <linux/kernel.h>
> > #include <linux/init.h>
> > #include <linux/resource.h>
> > +#include <linux/freezer.h>
> > #include <asm/uaccess.h>
> >
> > extern int delete_module(const char *name, unsigned int flags);
> > @@ -258,6 +259,7 @@ static int ____call_usermodehelper(void
> > new_session = key_get(sub_info->ring);
> > flush_signals(current);
> > spin_lock_irq(¤t->sighand->siglock);
> > + do_not_freeze(current);
> > old_session = __install_session_keyring(current, new_session);
> > flush_signal_handlers(current, 1);
> > sigemptyset(¤t->blocked);
> >
>
>
> this need a comment . Otherwise one reading will read it as we don't
> want it to freeze.
>
> How about
> /*
> clears TIF_FREEZE for the current task after flush_signals(current)
> returns, so that the
> freezer will generate one more freezing request for this task.
>
> */
Looks reasonable, but Oleg wants to drop the flush_signals(current) ...
Rafael
prev parent reply other threads:[~2007-02-26 18:28 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-26 10:39 [RFC][PATCH 0/3] More freezer patches Rafael J. Wysocki
2007-02-26 10:47 ` [RFC][PATCH 1/3] Freezer: Fix vfork problem Rafael J. Wysocki
2007-02-26 12:00 ` Oleg Nesterov
2007-02-26 15:14 ` Srivatsa Vaddagiri
2007-02-26 16:11 ` Oleg Nesterov
2007-02-26 18:28 ` Rafael J. Wysocki
2007-02-26 21:25 ` Oleg Nesterov
2007-02-27 0:31 ` Rafael J. Wysocki
2007-02-27 4:33 ` Aneesh Kumar
2007-02-27 4:42 ` Srivatsa Vaddagiri
2007-02-27 8:37 ` Oleg Nesterov
2007-02-27 21:21 ` Rafael J. Wysocki
2007-02-27 21:53 ` Oleg Nesterov
2007-02-28 1:23 ` Srivatsa Vaddagiri
2007-02-28 10:57 ` Rafael J. Wysocki
2007-02-28 11:00 ` Oleg Nesterov
2007-02-28 19:36 ` Rafael J. Wysocki
2007-02-28 20:30 ` Oleg Nesterov
2007-02-28 22:34 ` Rafael J. Wysocki
2007-02-28 11:01 ` Srivatsa Vaddagiri
2007-02-26 10:49 ` [RFC][PATCH 2/3] Freezer: Take kernel_execve into consideration Rafael J. Wysocki
2007-02-26 12:45 ` Pavel Machek
2007-02-26 10:52 ` [RFC][PATCH 3/3] Freezer: Prevent ___call_usermodehelper from missing freezing requests Rafael J. Wysocki
2007-02-26 11:52 ` Oleg Nesterov
2007-02-26 11:58 ` Aneesh Kumar
2007-02-26 18:30 ` Rafael J. Wysocki [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=200702261930.56550.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@osdl.org \
--cc=aneesh.kumar@gmail.com \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pavel@ucw.cz \
--cc=vatsa@in.ibm.com \
--subject='Re: [RFC][PATCH 3/3] Freezer: Prevent ___call_usermodehelper from missing freezing requests' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).