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: <20110812213037.GA24803@google.com>
Date:	Fri, 12 Aug 2011 14:30:37 -0700
From:	Todd Poynor <toddpoynor@...gle.com>
To:	"Munegowda, Keshava" <keshava_mgowda@...com>
Cc:	linux-usb@...r.kernel.org, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org, balbi@...com, gadiyar@...com,
	sameo@...ux.intel.com, parthab@...ia.ti.com, tony@...mide.com,
	khilman@...com, b-cousson@...com, paul@...an.com,
	johnstul@...ibm.com, vishwanath.bs@...com, nm@...com,
	vikram.pandita@...com
Subject: Re: [PATCH 5/5 v4] mfd: omap: usb: Runtime PM support

On Fri, Aug 12, 2011 at 12:20:21PM +0530, Munegowda, Keshava wrote:
> On Wed, Aug 10, 2011 at 10:01 PM, Todd Poynor <toddpoynor@...gle.com> wrote:
> >> @@ -913,12 +598,15 @@ static int usbhs_enable(struct device *dev)
> >>                               (pdata->ehci_data->reset_gpio_port[1], 1);
> >>       }
> >>
> >> -end_count:
> >> -     omap->count++;
> >> +     pm_runtime_put_sync(dev);
> >>       spin_unlock_irqrestore(&omap->lock, flags);
> >
> > Is pm_runtime_irq_safe() needed (else I think runtime PM callbacks may
> > re-enable IRQs... or there's the new *_suspend runtime PM calls that
> > may avoid this)?
> 
>  pm_runtime_irq_safe()  is not required; usbhs does not have a parent
> and it is the parent driver of
> ehci and ohci drivers.

But the above expects IRQs to be disabled during the
pm_runtime_put_sync, and synchronous calls can turn IRQs back on in
rpm_idle:

        if (callback) {
                spin_unlock_irq(&dev->power.lock);

                callback(dev);

I see other folks who know this better than me are discussing USB run
time PM and might_sleep contexts, so I'll note this concern and let
others chime in if they think there's a real problem here.


Todd
--
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