All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Uli Luckas <u.luckas@road.de>
Cc: LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH -mm 2/2] PM: Disable usermode helper before hibernation and suspend
Date: Fri, 15 Jun 2007 23:36:45 +0200	[thread overview]
Message-ID: <200706152336.46278.rjw@sisk.pl> (raw)
In-Reply-To: <200706151508.53191.u.luckas@road.de>

On Friday, 15 June 2007 15:08, Uli Luckas wrote:
> On Monday, 4. June 2007, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > Use a hibernation and suspend notifier to disable the user mode helper
> > before a hibernation/suspend and enable it after the operation.
> >
> Hi Rafael,
> I have a couple of questions, regarding this patch ...
> > -	if (!khelper_wq)
> > +	if (!khelper_wq || usermodehelper_disabled)
> >  		return -EBUSY;
> 1) how about not returning -EBUSY here, if (wait == UMH_NO_WAIT)?

Yes, this would make sense.

> 2) how does your patch prevent wait_for_completion(&done) to hang during
>    freezing if usermodehelper_pm_callback is called _after_ the above check?

It doesn't.  Once the helper is running, we can't distinguish it from any other
user land process.

Still, it narrows the window quite a bit.

Greetings,
Rafael


-- 
"Premature optimization is the root of all evil." - Donald Knuth

  reply	other threads:[~2007-06-15 21:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-04 21:25 [PATCH -mm 0/2] PM: Hibernation and suspend notifiers Rafael J. Wysocki
2007-06-04 21:27 ` [PATCH -mm 1/2] PM: Introduce hibernation " Rafael J. Wysocki
2007-06-04 21:28 ` [PATCH -mm 2/2] PM: Disable usermode helper before hibernation and suspend Rafael J. Wysocki
2007-06-04 21:33   ` Nigel Cunningham
2007-06-15 13:08   ` Uli Luckas
2007-06-15 21:36     ` Rafael J. Wysocki [this message]
2007-06-17 19:24       ` Rafael J. Wysocki
2007-06-18 10:51         ` Uli Luckas
2007-06-18 15:15           ` Rafael J. Wysocki
2007-06-18 18:23             ` Uli Luckas

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=200706152336.46278.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=u.luckas@road.de \
    /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.