LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: David Brownell <david-b@pacbell.net>,
	Christian Kujau <lists@nerdbynature.de>
Cc: LKML <linux-kernel@vger.kernel.org>, <0x0007@gmail.com>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: WARNING: at drivers/usb/host/ehci-hcd.c:287
Date: Tue, 4 Mar 2008 11:29:58 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.0803041118100.4039-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0803032330190.5974@sheep.housecafe.de>

On Mon, 3 Mar 2008, Christian Kujau wrote:

> On Mon, 3 Mar 2008, Christian Kujau wrote:
> > after upgrading to 2.6.25-rc3, kern.log shows:
> >
> > [ 1535.884848] ------------[ cut here ]------------
> > [ 1535.884855] WARNING: at drivers/usb/host/ehci-hcd.c:287
> 
> Hm, after ~24h of uptime, this message appeared 25 times already.
> The WLAN USB device was used the whole time, the usb-storage module
> was hardly used over the day:
> 
> # grep usb /proc/interrupts
>   10:   10693403    XT-PIC-XT        ohci_hcd:usb3, eth0
>   11:   10270770    XT-PIC-XT        sym53c8xx, ehci_hcd:usb1
>   12:         91    XT-PIC-XT        ohci_hcd:usb2
> 
> I even tried to trigger the system freeze[0] by using usb-storage
> and reading a lot from it, but no freeze, and the message could
> not be triggered either - they pop up every now and then, but too often, 
> IMHO.
> 
> Can anybody shed some light on this?

Dave, it seems to me that this must be an example of a race between the 
iaa watchdog timer expiring and end_unlink_async() running.  It's not 
good enough for end_unlink_async() to call iaa_watchdog_done(), because 
on an SMP system the timer may already have fired and the watchdog 
routine may be spinning on ehci->lock.

It's even worse, because end_unlink_async() can call 
start_unlink_async().  If that happens, the watchdog routine will think 
the timer has expired when in fact it has just been restarted.

How about replacing the

	WARN_ON(!ehci->reclaim);

line in ehci_iaa_watchdog() with

	if (unlikely(!ehci->reclaim || 
			!HC_IS_RUNNING(ehci_to_hcd(ehci)->state) ||
			timer_pending(&ehci->iaa_watchdog))
		goto done;

where "done:" is added just before the spin_unlock_irqrestore?

Alan Stern


  reply	other threads:[~2008-03-04 16:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03  0:05 Christian Kujau
2008-03-03 22:38 ` Christian Kujau
2008-03-04 16:29   ` Alan Stern [this message]
2008-03-04 18:53     ` Christian Kujau
2008-03-04 20:27       ` Alan Stern
2008-03-04 20:51     ` David Brownell
2008-03-04 20:57       ` Alan Stern
2008-03-04 22:01         ` David Brownell
2008-03-04 23:15           ` Christian Kujau
2008-03-05  0:30             ` David Brownell
2008-03-05  1:15               ` Christian Kujau
2008-03-05  4:25                 ` David Brownell
2008-03-05 22:59                   ` Christian Kujau
2008-03-07 19:51                     ` Christian Kujau
2008-03-04  7:49 ` Andrew Morton
2008-03-04  8:01   ` Christian Kujau
2008-03-04  8:10     ` Andrew Morton

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.0803041118100.4039-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=0x0007@gmail.com \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lists@nerdbynature.de \
    --subject='Re: WARNING: at drivers/usb/host/ehci-hcd.c:287' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).