NetBSD Problem Report #33450
From www@netbsd.org Tue May 9 03:40:20 2006
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
id C26AA63B898; Tue, 9 May 2006 03:40:20 +0000 (UTC)
Message-Id: <20060509034020.C26AA63B898@narn.netbsd.org>
Date: Tue, 9 May 2006 03:40:20 +0000 (UTC)
From: ric.yeates@radisys.com
Reply-To: ric.yeates@radisys.com
To: gnats-bugs@netbsd.org
Subject: OHCI_DEBUG code in ohci_softintr() causes infinite loop
X-Send-Pr-Version: www-1.0
>Number: 33450
>Category: kern
>Synopsis: OHCI_DEBUG code in ohci_softintr() causes infinite loop
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 10 10:16:45 +0000 2006
>Closed-Date: Sun Mar 24 15:50:02 +0000 2013
>Last-Modified: Sat Apr 20 09:55:02 +0000 2013
>Originator: Ric Yeates
>Release: HEAD
>Organization:
RadiSys Corp.
>Environment:
Don't have a NetBSD machine, I'm porting code for use in our RTOS.
>Description:
The code snippet:
#ifdef OHCI_DEBUG
if (ohcidebug > 10) {
DPRINTF(("ohci_process_done: TD done:\n"));
ohci_dump_tds(sc, sdone);
}
#endif
makes use of ohci_dump_tds(), but the TD list pointed to by sdone is linked with the dnext field, so the TD walk can cause an infinite loop or other nasty behavior.
>How-To-Repeat:
Compile USB support with OHCI_DEBUG and set ohcidebug > 10.
>Fix:
I fixed it by using this code:
for (std = sdone; std; std = std->dnext)
ohci_dump_td(sc, std);
Likewise for sidone in the next block of OHCI_DEBUG code.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Sun, 24 Mar 2013 15:50:02 +0000
State-Changed-Why:
Fixed committed.
From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/33450 CVS commit: [netbsd-6] src/sys/dev/usb
Date: Sat, 20 Apr 2013 09:52:20 +0000
Module Name: src
Committed By: bouyer
Date: Sat Apr 20 09:52:20 UTC 2013
Modified Files:
src/sys/dev/usb [netbsd-6]: ohci.c
Log Message:
Pull up following revision(s) (requested by skrll in ticket #864):
sys/dev/usb/ohci.c: revision 1.234
sys/dev/usb/ohci.c: revision 1.236
Don't leak memory if ohci_alloc_std_chain fails.
When dumping the done list in ohci_softintr / OHCI_DEBUG use the correct
list next pointer.
PR/33450 and part of PR/35379.
To generate a diff of this commit:
cvs rdiff -u -r1.218.8.1 -r1.218.8.2 src/sys/dev/usb/ohci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.