public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Greg KH <greg@kroah.com>
Cc: davidm@hpl.hp.com, linux-kernel@vger.kernel.org,
	linux-ia64@linuxia64.org, linux-usb-devel@lists.sourceforge.net
Subject: Re: USB deadlock in v2.5.67
Date: Fri, 18 Apr 2003 08:46:56 -0700	[thread overview]
Message-ID: <3EA01DF0.9080305@pacbell.net> (raw)
In-Reply-To: 20030418045006.GB1813@kroah.com

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

Greg KH wrote:
> On Thu, Apr 17, 2003 at 07:02:07PM -0700, David Mosberger wrote:
> 
>><hcd_free_dev+0x140> translates into line 1249 in hcd.c, where it
>>does:
>>
>>	spin_lock_irqsave (&hcd_data_lock, flags);
>>
>>The deadlock is pretty obvious: the same lock has already been
>>acquired urb_unlink(), 4 levels up in the call-chain.
>>
>>Anybody have a fix for this?
> 
> 
> David (Brownell, that is), does this help with the trace I sent you a
> few hours ago?

Seems to be a different problem.  The patch below should
resolve the keyboard problem -- just reorders two lines
so the lock isn't held after the device's records get
deleted, so the order is what it should always have been.

- Dave





[-- Attachment #2: hang.patch --]
[-- Type: text/plain, Size: 332 bytes --]

--- 1.59/drivers/usb/core/hcd.c	Mon Apr 14 14:01:44 2003
+++ edited/drivers/usb/core/hcd.c	Fri Apr 18 08:20:42 2003
@@ -961,8 +961,8 @@
 	spin_lock_irqsave (&hcd_data_lock, flags);
 	list_del_init (&urb->urb_list);
 	dev = urb->dev;
-	usb_put_dev (dev);
 	spin_unlock_irqrestore (&hcd_data_lock, flags);
+	usb_put_dev (dev);
 }
 
 

  reply	other threads:[~2003-04-18 15:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-18  2:02 USB deadlock in v2.5.67 David Mosberger
2003-04-18  4:50 ` Greg KH
2003-04-18 15:46   ` David Brownell [this message]
2003-04-18 18:16     ` David Mosberger
2003-04-18 23:19     ` Greg KH

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=3EA01DF0.9080305@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=davidm@hpl.hp.com \
    --cc=greg@kroah.com \
    --cc=linux-ia64@linuxia64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /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