From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Jiri Kosina <jkosina@suse.cz>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH RFC] apm-emulation: apm_mutex breaks ACK; remove it
Date: Tue, 17 May 2011 21:13:04 +0200 [thread overview]
Message-ID: <201105172113.04249.rjw@sisk.pl> (raw)
In-Reply-To: <alpine.LNX.2.00.1105171429220.28291@pobox.suse.cz>
On Tuesday, May 17, 2011, Jiri Kosina wrote:
> On Tue, 17 May 2011, Jiri Kosina wrote:
>
> > On Fri, 13 May 2011, Paul Parsons wrote:
> >
> > > apm_mutex is locked by a process (e.g. apm -s) at the start of
> > > apm_ioctl() and remains locked while pm_suspend() is called. Any
> > > subsequent process trying to ACK the suspend (e.g. apmd) is then blocked
> > > at the start of apm_ioctl(), causing the suspend to be delayed for 5
> > > seconds in apm_suspend_notifier() while the ACK times out. In short,
> > > ACKs don't work.
> > >
> > > The driver's data structures are sufficiently protected by assorted
> > > locks. And pm_suspend() has its own mutex to prevent reentrancy.
> > > Consequently there is no obvious requirement for apm_mutex, which
> > > evolved from earlier BKL calls. So let's remove it.
> > >
> > >
> > > Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
> > > ---
> > > This patch supersedes my previous "apm-emulation: Fix mutex race condition" patch; this patch fixes that earlier bug too.
> >
> > Looks good to me (and sorry for the delay). Thanks Paul, will apply.
>
> (unless Rafael sees any potential issue there of course ... but I myself
> don't).
No, I don't.
Thanks,
Rafael
prev parent reply other threads:[~2011-05-17 19:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 1:46 [PATCH RFC] apm-emulation: apm_mutex breaks ACK; remove it Paul Parsons
2011-05-17 12:26 ` Jiri Kosina
2011-05-17 12:29 ` Jiri Kosina
2011-05-17 19:13 ` 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=201105172113.04249.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=jkosina@suse.cz \
--cc=linux-pm@lists.linux-foundation.org \
/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