All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Jiri Slaby <jslaby@suse.cz>
Cc: Oliver Neukum <oliver@neukum.org>, <pingc@wacom.com>,
	Dmitry Torokhov <dtor@mail.ru>,
	linux-pm <linux-pm@lists.linux-foundation.org>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	<linux-input@vger.kernel.org>
Subject: Re: [linux-pm] wacom + runtime PM = AA deadlock
Date: Mon, 13 Sep 2010 10:25:38 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1009131019370.1584-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <4C8E180D.4020309@suse.cz>

On Mon, 13 Sep 2010, Jiri Slaby wrote:

> Hi,
> 
> by mistake when runtime PM is enabled by default for input devices, X
> hangs on wacom open:
> [<ffffffff814a00ea>] mutex_lock+0x1a/0x40
> [<ffffffffa02bc94b>] wacom_resume+0x3b/0x90 [wacom]
> [<ffffffff81327a32>] usb_resume_interface+0xd2/0x190
> [<ffffffff81327b5d>] usb_resume_both+0x6d/0x110
> [<ffffffff81327c24>] usb_runtime_resume+0x24/0x40
> [<ffffffff8130a2cf>] __pm_runtime_resume+0x26f/0x450
> [<ffffffff8130a23a>] __pm_runtime_resume+0x1da/0x450
> [<ffffffff8130a53a>] pm_runtime_resume+0x2a/0x50
> [<ffffffff81328176>] usb_autopm_get_interface+0x26/0x60
> [<ffffffffa02bc626>] wacom_open+0x36/0x90 [wacom]
> 
> wacom_open took wacom->lock and calls usb_autopm_get_interface which in
> turn calls wacom_resume which tries to aquire the lock again.
> 
> More details (dmesg including) at:
> https://bugzilla.novell.com/show_bug.cgi?id=638506
> 
> Any ideas how to fix that properly?

One possibility is for wacom_open simply not to acquire the lock until
after the usb_autopm_get_interface call returns.  And why does
wacom_open have that assignment to wacom->irq->dev?  The value was
already set in wacom_probe.

BTW, does anybody know why wacom_open calls usb_autopm_get_interface 
but wacom_close doesn't call usb_autopm_put_interface?

Alan Stern


WARNING: multiple messages have this Message-ID (diff)
From: Alan Stern <stern@rowland.harvard.edu>
To: Jiri Slaby <jslaby@suse.cz>
Cc: Oliver Neukum <oliver@neukum.org>,
	pingc@wacom.com, Dmitry Torokhov <dtor@mail.ru>,
	linux-pm <linux-pm@lists.linux-foundation.org>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	linux-input@vger.kernel.org
Subject: Re: [linux-pm] wacom + runtime PM = AA deadlock
Date: Mon, 13 Sep 2010 10:25:38 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1009131019370.1584-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <4C8E180D.4020309@suse.cz>

On Mon, 13 Sep 2010, Jiri Slaby wrote:

> Hi,
> 
> by mistake when runtime PM is enabled by default for input devices, X
> hangs on wacom open:
> [<ffffffff814a00ea>] mutex_lock+0x1a/0x40
> [<ffffffffa02bc94b>] wacom_resume+0x3b/0x90 [wacom]
> [<ffffffff81327a32>] usb_resume_interface+0xd2/0x190
> [<ffffffff81327b5d>] usb_resume_both+0x6d/0x110
> [<ffffffff81327c24>] usb_runtime_resume+0x24/0x40
> [<ffffffff8130a2cf>] __pm_runtime_resume+0x26f/0x450
> [<ffffffff8130a23a>] __pm_runtime_resume+0x1da/0x450
> [<ffffffff8130a53a>] pm_runtime_resume+0x2a/0x50
> [<ffffffff81328176>] usb_autopm_get_interface+0x26/0x60
> [<ffffffffa02bc626>] wacom_open+0x36/0x90 [wacom]
> 
> wacom_open took wacom->lock and calls usb_autopm_get_interface which in
> turn calls wacom_resume which tries to aquire the lock again.
> 
> More details (dmesg including) at:
> https://bugzilla.novell.com/show_bug.cgi?id=638506
> 
> Any ideas how to fix that properly?

One possibility is for wacom_open simply not to acquire the lock until
after the usb_autopm_get_interface call returns.  And why does
wacom_open have that assignment to wacom->irq->dev?  The value was
already set in wacom_probe.

BTW, does anybody know why wacom_open calls usb_autopm_get_interface 
but wacom_close doesn't call usb_autopm_put_interface?

Alan Stern


  parent reply	other threads:[~2010-09-13 14:25 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 12:24 wacom + runtime PM = AA deadlock Jiri Slaby
2010-09-13 14:25 ` Alan Stern
2010-09-13 14:25 ` Alan Stern [this message]
2010-09-13 14:25   ` [linux-pm] " Alan Stern
2010-09-13 14:56 ` Oliver Neukum
2010-09-13 15:17   ` [linux-pm] " Alan Stern
2010-09-13 15:17     ` Alan Stern
2010-09-13 19:05     ` Oliver Neukum
2010-09-13 19:05     ` [linux-pm] " Oliver Neukum
2010-09-13 20:02       ` Alan Stern
2010-09-13 20:02       ` [linux-pm] " Alan Stern
2010-09-13 20:02         ` Alan Stern
2010-09-13 20:28         ` Dmitry Torokhov
2010-09-13 20:28         ` Dmitry Torokhov
2010-09-14  8:13         ` Oliver Neukum
2010-09-14  8:13         ` [linux-pm] " Oliver Neukum
2010-09-14 14:01           ` Alan Stern
2010-09-14 14:01             ` Alan Stern
2010-09-14 14:03             ` Oliver Neukum
2010-09-14 15:23               ` Alan Stern
2010-09-14 15:23                 ` Alan Stern
2010-09-14 15:30                 ` Oliver Neukum
2010-09-14 15:30                 ` [linux-pm] " Oliver Neukum
2010-09-14 16:05                   ` Alan Stern
2010-09-14 16:05                   ` [linux-pm] " Alan Stern
2010-09-14 16:05                     ` Alan Stern
2010-09-14 15:23               ` Alan Stern
2010-09-14 14:03             ` Oliver Neukum
2010-09-14 14:01           ` Alan Stern
2010-09-13 15:17   ` Alan Stern
2010-09-13 17:10   ` Dmitry Torokhov
2010-09-13 17:10   ` Dmitry Torokhov
2010-09-13 19:20     ` Oliver Neukum
2010-09-13 19:20     ` [linux-pm] " Oliver Neukum
2010-09-14  0:52       ` Dmitry Torokhov
2010-09-14  0:52       ` [linux-pm] " Dmitry Torokhov
2010-09-14  6:07         ` Oliver Neukum
2010-09-14  6:07         ` [linux-pm] " Oliver Neukum
2010-10-04 16:13           ` Dmitry Torokhov
2010-10-04 18:33             ` Oliver Neukum
2010-10-04 18:33             ` [linux-pm] " Oliver Neukum
2010-10-04 18:38               ` Dmitry Torokhov
2010-10-04 18:38               ` [linux-pm] " Dmitry Torokhov
2010-10-04 19:24                 ` Oliver Neukum
2010-10-05  5:41                   ` Dmitry Torokhov
2010-10-05  5:41                   ` [linux-pm] " Dmitry Torokhov
2010-10-05  5:54                     ` Oliver Neukum
2010-10-05  5:54                     ` Oliver Neukum
2010-10-04 19:24                 ` Oliver Neukum
2010-10-04 16:13           ` Dmitry Torokhov
2010-09-13 14:56 ` Oliver Neukum

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=Pine.LNX.4.44L0.1009131019370.1584-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=dtor@mail.ru \
    --cc=jslaby@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=oliver@neukum.org \
    --cc=pingc@wacom.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.