From: Jiri Kosina <jkosina@suse.cz>
To: Oliver Neukum <oliver@neukum.org>,
Johannes Berg <johannes@sipsolutions.net>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input <linux-input@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Oleg Nesterov <oleg@redhat.com>
Subject: Re: lockdep report at resume
Date: Tue, 21 Apr 2009 16:11:03 +0200 (CEST) [thread overview]
Message-ID: <alpine.LNX.2.00.0904211609220.13028@wotan.suse.de> (raw)
In-Reply-To: <200904211559.43497.oliver@neukum.org>
On Tue, 21 Apr 2009, Oliver Neukum wrote:
> > [ thanks for the analysis Johannes ... involving also Oliver here; really
> > seems like a false positive to me ]
> I think he's right. But as a matter of principle I'd like to see
> flush_scheduled_work() avoided where possible, hence the patch.
I am not entirely sure that this is the same issue as the one from #13136
of kernel.org bugzilla.
Anyway, for reference, the patch Oliver mentioned here is below.
>From oliver@neukum.org Tue Apr 21 15:38:41 2009
Date: Tue, 21 Apr 2009 15:38:12 +0200
From: Oliver Neukum <oliver@neukum.org>
To: Andrew Morton <akpm@linux-foundation.org>, casteyde.christian@free.fr
Cc: Jiri Kosina <jkosina@suse.cz>, Rafael J. Wysocki <rjw@sisk.pl>
Subject: Re: [Bugme-new] [Bug 13136] New: possible circular locking dependency detected while suspending laptop to S3
Am Dienstag 21 April 2009 01:01:13 schrieb Andrew Morton:
> On Sat, 18 Apr 2009 11:17:47 GMT
>
> bugzilla-daemon@bugzilla.kernel.org wrote:
> > http://bugzilla.kernel.org/show_bug.cgi?id=13136
>
> Looks like a post-2.6.29 regression in usb-hid. usbhid_close() holding
> hid_open_mut while doing flush_scheduled_work().
>
> Could you gents please work out where the problem is and suitably
> assign the report?
Please test this patch.
Regards
Oliver
---
commit 4bdc818cca662000cf195b1e83e8a0f8a3f0b9c6
Author: Oliver Neukum <oneukum@linux-d698.(none)>
Date: Tue Apr 21 15:33:41 2009 +0200
avoid deadlock in usbhid_close by cancelling workqueues
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 4306cb1..900ce18 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -662,8 +662,8 @@ void usbhid_close(struct hid_device *hid)
spin_lock_irq(&usbhid->lock);
if (!--hid->open) {
spin_unlock_irq(&usbhid->lock);
+ hid_cancel_delayed_stuff(usbhid);
usb_kill_urb(usbhid->urbin);
- flush_scheduled_work();
usbhid->intf->needs_remote_wakeup = 0;
} else {
spin_unlock_irq(&usbhid->lock);
Thanks,
--
Jiri Kosina
SUSE Labs
next prev parent reply other threads:[~2009-04-21 14:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1234022517.4175.107.camel@johannes.local>
[not found] ` <1237536764.5100.124.camel@johannes.local>
[not found] ` <alpine.LNX.2.00.0903201535470.14346@wotan.suse.de>
[not found] ` <1237800572.19647.97.camel@johannes.local>
[not found] ` <alpine.LNX.2.00.0903311034560.14346@wotan.suse.de>
[not found] ` <1238488692.5970.80.camel@johannes.local>
[not found] ` <alpine.LNX.2.00.0903311039480.14346@wotan.suse.de>
2009-04-01 9:40 ` Johannes Berg
2009-04-01 10:00 ` Johannes Berg
2009-04-21 13:51 ` Jiri Kosina
2009-04-21 13:59 ` Oliver Neukum
2009-04-21 14:11 ` Jiri Kosina [this message]
2009-04-21 14:14 ` Oliver Neukum
2009-04-21 14:26 ` Johannes Berg
2009-05-05 12:47 ` Jiri Kosina
2009-05-08 10:25 ` Johannes Berg
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=alpine.LNX.2.00.0904211609220.13028@wotan.suse.de \
--to=jkosina@suse.cz \
--cc=dmitry.torokhov@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=oliver@neukum.org \
--cc=rjw@sisk.pl \
/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
all inboxes | Powered by JetHome®