From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Tejun Heo <tj@kernel.org>, Dave Jones <davej@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
linux-usb@vger.kernel.org,
Sarah Sharp <sarah.a.sharp@linux.intel.com>,
Lan Tianyu <tianyu.lan@intel.com>
Subject: [PATCH 0/2] USB PM and PM QoS fixes (Re: gpf in pm_qos_remote_wakeup_show)
Date: Mon, 01 Apr 2013 00:56:31 +0200 [thread overview]
Message-ID: <1876128.a4gSDF7byc@vostro.rjw.lan> (raw)
In-Reply-To: <2829731.BFs3ri3Eud@vostro.rjw.lan>
On Sunday, March 31, 2013 03:41:11 AM Rafael J. Wysocki wrote:
> [Moving the thread to the LKML.]
>
> On Saturday, March 30, 2013 06:41:16 PM Sasha Levin wrote:
> > On 03/15/2013 01:06 PM, Rafael J. Wysocki wrote:
> [...]
> > >> Rafael, Is there anything you would like me to test?
> > >
> > > Please just test 3.9-rc2 (or later).
> >
> > Hi Rafael,
>
> Hi,
>
> > I got this after a bit of fuzzing, it looks related to the fix:
>
> So the complaint is that we shouldn't call pm_qos_sysfs_remove_flags() under
> dev_pm_qos_mtx, because then it may deadlock with dev_pm_qos_update_flags()
> called from pm_qos_remote_wakeup_store(), for example. This appears to be a
> valid one.
>
> To avoid that, we can use a separate mutex for exposing/hiding the flags
> (and the latency limit too) that won't be acquired by dev_pm_qos_update_flags()
> or dev_pm_qos_update_request().
>
> Can you please try the patch below?
Never mind, I have reproduced the lockdep splat and the patch fixes it for me.
Moreover, I've discovered that we call dev_pm_qos_hide_flags() from
usb_port_device_release(), which is totally incorrect.
So, I have two patches (on top of the Linus' tree) that will follow shortly:
[1/2] USB / PM: Don't try to hide PM QoS flags from usb_port_device_release()
[2/2] PM / QoS: Avoid possible deadlock related to sysfs access
Thanks,
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
next prev parent reply other threads:[~2013-03-31 22:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <512F8980.4040809@oracle.com>
[not found] ` <25276895.qZKN0MF88v@vostro.rjw.lan>
[not found] ` <51576A0C.5030907@oracle.com>
2013-03-31 1:41 ` gpf in pm_qos_remote_wakeup_show Rafael J. Wysocki
2013-03-31 22:56 ` Rafael J. Wysocki [this message]
2013-03-31 22:57 ` [PATCH 1/2] USB / PM: Don't try to hide PM QoS flags from usb_port_device_release() Rafael J. Wysocki
2013-04-01 3:03 ` Greg Kroah-Hartman
2013-03-31 22:58 ` [PATCH 2/2] PM / QoS: Avoid possible deadlock related to sysfs access Rafael J. Wysocki
2013-04-01 3:29 ` [PATCH 0/2] USB PM and PM QoS fixes (Re: gpf in pm_qos_remote_wakeup_show) Linus Torvalds
2013-04-01 13:22 ` Rafael J. Wysocki
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=1876128.a4gSDF7byc@vostro.rjw.lan \
--to=rjw@sisk.pl \
--cc=davej@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=sasha.levin@oracle.com \
--cc=tianyu.lan@intel.com \
--cc=tj@kernel.org \
--cc=torvalds@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