lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201109131806.39050.rjw@sisk.pl>
Date:	Tue, 13 Sep 2011 18:06:38 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Ming Lei <tom.leiming@...il.com>
Cc:	Linux PM mailing list <linux-pm@...ts.linux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"Linux-sh list" <linux-sh@...r.kernel.org>,
	Magnus Damm <magnus.damm@...il.com>,
	Kevin Hilman <khilman@...com>, jean.pihet@...oldbits.com
Subject: Re: [PATCH 2/5] PM / Runtime: Do not run callbacks under lock for power.irq_safe set

On Tuesday, September 13, 2011, Ming Lei wrote:
> Hi,
> 
> On Tue, Sep 13, 2011 at 5:44 AM, Rafael J. Wysocki <rjw@...k.pl> wrote:
> > Hi,
> >
> > On Monday, September 12, 2011, Ming Lei wrote:
> >
> >> Hi,
> >
> >>
> >
> >> On Wed, Aug 31, 2011 at 6:20 AM, Rafael J. Wysocki <rjw@...k.pl> wrote:
> >
> >> > From: Rafael J. Wysocki <rjw@...k.pl>
> >
> >> >
> >
> >> > The rpm_suspend() and rpm_resume() routines execute subsystem or PM
> >
> >> > domain callbacks under power.lock if power.irq_safe is set for the
> >
> >> > given device.  This is inconsistent with that rpm_idle() does after
> >
> >> > commit 02b2677 (PM / Runtime: Allow _put_sync() from
> >
> >> > interrupts-disabled context) and is problematic for subsystems and PM
> >
> >> > domains wanting to use power.lock for synchronization in their
> >
> >> > runtime PM callbacks.  For this reason, make runtime PM core functions
> >
> >> > always release power.lock before invoking subsystem or PM domain
> >
> >>
> >
> >> If power.lock is released, the transition states(resuming or suspending)
> >
> >> may be observed in rpm_suspend or rpm_resume, then tasks schedule
> >
> >> will be produced in these two functions,
> >
> > I don't think so, because the interrupts are still off.
> 
> Yes, the interrupts are still off on local CPU, but the release of spin lock may
> cause another CPUs to run into rpm_suspend or rpm_resume and produce
> task schedule inside the two functions.

Not for the same device, though.

Also, I'm not quite sure what scenario exactly are you referring to.
Could you please give an example?

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ