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]
Date:	Mon, 22 Jun 2009 17:27:28 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Magnus Damm <magnus.damm@...il.com>, Greg KH <gregkh@...e.de>,
	LKML <linux-kernel@...r.kernel.org>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	"Linux-pm mailing list" <linux-pm@...ts.linux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [linux-pm] [patch update 2 fix] PM: Introduce core framework for run-time PM of I/O devices

On Monday 22 June 2009, Alan Stern wrote:
> On Sun, 21 Jun 2009, Rafael J. Wysocki wrote:
> 
> > > Seriously, there _are_ places where drivers get bound to device before
> > > those devices are registered.  This happens for example in USB when a
> > > bunch of related interfaces are present in the same physical device.  
> > > When the first interface is registered, its driver binds itself to all
> > > the others even though they haven't been registered yet.
> > 
> > Well, the suspend functions could be protected against that under the
> > assumption that no suspend is possible for resume_counter = 0 (then, the "good
> > to go" value would be -1).
> > 
> > Still, the resume functions start from acquring a spinlock, which is not going
> > to work if that spinlock is uninitialized.
> 
> The initialization needs to be improved.  Most of the code in
> pm_runtime_init() should be called from device_pm_init(), and the rest
> should be moved into a separate pm_runtime_add() routine to be called
> from device_pm_add().

OK

In that case, I think, the initialization of the spinlock and resume_counter
can be put into the thing called by device_pm_init().

> One of the things pm_runtime_add() could do is change the status from 
> RPM_UNREGISTERED to RPM_ACTIVE.

If the status is initially (ie. at the device_pm_init() point) RPM_ACTIVE and
resume_couter is initially 1, what are we going to need RPM_UNREGISTERED for?

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