NetBSD Problem Report #24542
Received: (qmail 18533 invoked by uid 605); 24 Feb 2004 05:31:31 -0000
Message-Id: <Pine.BSF.4.51.0402240023220.18170@vegeta.city-net.com>
Date: Tue, 24 Feb 2004 00:25:21 -0500 (EST)
From: Matthew Orgass <darkstar@city-net.com>
Sender: gnats-bugs-owner@NetBSD.org
To: gnats-bugs@gnats.netbsd.org
Subject: uhci panics with QUEUEDEBUG
>Number: 24542
>Category: kern
>Synopsis: uhci panics with QUEUEDEBUG
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 24 05:32:00 +0000 2004
>Closed-Date: Tue Mar 02 16:33:34 +0000 2004
>Last-Modified: Tue Mar 02 16:33:34 +0000 2004
>Originator: darkstar@city-net.com
>Release: NetBSD 1.6ZK
>Organization:
>Environment:
System: NetBSD jove.city-net.com 1.6ZK NetBSD 1.6ZK (JOVE) #2: Tue Feb 24 09:57:53 UTC 2004 root@jove.city-net.com:/usr/iobj/sys/arch/i386/compile/JOVE i386
Architecture: i386
Machine: i386
>Description:
A system with a uhci device and QUEUEDEBUG panics on boot.
>How-To-Repeat:
>Fix:
Index: sys/dev/usb/uhci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/uhci.c,v
retrieving revision 1.177
diff -u -r1.177 uhci.c
--- sys/dev/usb/uhci.c 29 Dec 2003 08:17:10 -0000 1.177
+++ sys/dev/usb/uhci.c 24 Feb 2004 05:06:43 -0000
@@ -1258,7 +1258,7 @@
uhci_softintr(void *v)
{
uhci_softc_t *sc = v;
- uhci_intr_info_t *ii;
+ uhci_intr_info_t *ii, *nextii;
DPRINTFN(10,("%s: uhci_softintr (%d)\n", USBDEVNAME(sc->sc_bus.bdev),
sc->sc_bus.intr_context));
@@ -1276,8 +1276,10 @@
* We scan all interrupt descriptors to see if any have
* completed.
*/
- for (ii = LIST_FIRST(&sc->sc_intrhead); ii; ii = LIST_NEXT(ii, list))
+ for (ii = LIST_FIRST(&sc->sc_intrhead); ii; ii = nextii) {
+ nextii = LIST_NEXT(ii, list);
uhci_check_intr(sc, ii);
+ }
#ifdef USB_USE_SOFTINTR
if (sc->sc_softwake) {
>Release-Note:
>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: Matthew Orgass <darkstar@city-net.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/24542: uhci panics with QUEUEDEBUG
Date: Mon, 1 Mar 2004 23:21:55 +0100
On Tue, Feb 24, 2004 at 12:25:21AM -0500, Matthew Orgass wrote:
> A system with a uhci device and QUEUEDEBUG panics on boot.
Sorry, I'm probably blind... - what does your suggested patch actually fix?
Martin
From: Matthew Orgass <darkstar@city-net.com>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/24542: uhci panics with QUEUEDEBUG
Date: Mon, 1 Mar 2004 19:41:28 -0500 (EST)
On 2004-03-01 martin@duskware.de wrote:
> On Tue, Feb 24, 2004 at 12:25:21AM -0500, Matthew Orgass wrote:
> > A system with a uhci device and QUEUEDEBUG panics on boot.
>
> Sorry, I'm probably blind... - what does your suggested patch actually fix?
The problem is that uhci_check_intr might remove ii from the list,
invalidating the next pointer. If QUEUEDEBUG is defined, the next pointer
is overwritten at that point and subsequent access causes invalid memory
access. The proposed fix is what is done in ehci.
Matthew Orgass
darkstar@city-net.com
From: Martin Husemann <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/24542 CVS commit: src/sys/dev/usb
Date: Tue, 2 Mar 2004 16:32:06 +0000 (UTC)
Module Name: src
Committed By: martin
Date: Tue Mar 2 16:32:06 UTC 2004
Modified Files:
src/sys/dev/usb: uhci.c
Log Message:
Interrupt descriptors might become invalid while being processed in
uhci_check_intr - so remember their next pointer before calling it.
Patch provided by Matthew Orgass in PR kern/24542.
To generate a diff of this commit:
cvs rdiff -r1.177 -r1.178 src/sys/dev/usb/uhci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: martin
State-Changed-When: Tue Mar 2 16:33:03 UTC 2004
State-Changed-Why:
Patch applied, thanks!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.