public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: johan verrept <johan.verrept@pandora.be>
To: linux-usb-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, Tony Hoyle <tmh@magenta-netlogic.com>
Subject: Re: [linux-usb-devel] Repeatable lockup on SMP w/usbprocfs
Date: Thu, 29 Mar 2001 00:40:37 +0200	[thread overview]
Message-ID: <3AC26865.8D034960@pandora.be> (raw)
In-Reply-To: <3AC24EF0.6060800@magenta-netlogic.com>

Tony Hoyle wrote:
> 
> If an application calls the USBDEVFS_SUBMITURB ioctl to submit a read,
> when the async completion routine is called, the kernel goes into a hard
> deadlock (no response to ping, etc.).  I've narrowed it down to the
> async_completed routine in usb.c.  That's the only place where spinlocks
> are used.  I'm not familiar enough with them to see what the error is,
> though.

It is async_completed in devio.c btw.
I have looked at this too, but I am not sure whether this happens when the completion is called or
when the program does a USBDEVFS_REAPURB(NDELAY).
I have looked at the code, but I do not see anything obviously wrong.

One thing I considered weird is the "wake_up(&ps->wait);" in async_completed().
This will wake up the program that has submitted the urb, whether is expects to be woken or not. I
am not sure what the consequences of this are, but it seems harmless enough.

> The system runs fine until the packet is returned, then it just locks 
> solid (On the alcatel USB modem I used for testing it will not respond 
> until it gets sync, which may be several seconds).

I have also noticed this only with the Alcatel SpeedTouch USB driver. I am not aware of any other
driver that uses this although I am writing one that will be using this. It is very possible the
program does something wrong (For example the code mixes the async and the sync versions of the urb
ioctl's...), but even then it is not supposed to be able to lock up the whole machine.

> Others have found that just compiling SMP into the kernel is enough to
> break it, you don't actually need two processors.

Probably because when you turn SMP off, spinlocks are disabled so deadlocks are avoided.

	J.

       reply	other threads:[~2001-03-28 23:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3AC24EF0.6060800@magenta-netlogic.com>
2001-03-28 22:40 ` johan verrept [this message]
2001-04-27 18:57   ` [linux-usb-devel] Repeatable lockup on SMP w/usbprocfs volodya
2001-03-28 23:36 ` Tony Hoyle

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=3AC26865.8D034960@pandora.be \
    --to=johan.verrept@pandora.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=tmh@magenta-netlogic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox