From owner-freebsd-current@FreeBSD.ORG Fri Dec 10 18:15:22 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5047E1065674; Fri, 10 Dec 2010 18:15:22 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.c2i.net [212.247.154.130]) by mx1.freebsd.org (Postfix) with ESMTP id 79E5F8FC23; Fri, 10 Dec 2010 18:15:20 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=5OBHFxb9I47YZ7HELXzI6cL6pwPTRnd5uxbD1DPQ4WY= c=1 sm=1 a=KFcVJYsbzGUA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=pGLkceISAAAA:8 a=8kQB0OdkAAAA:8 a=y1D6EcbfUNCBmWDcUugA:9 a=4OoJYbwDOlt0HrFXVbP7obc5opgA:4 a=PUjeQqilurYA:10 a=MSl-tDqOz04A:10 a=9aOQ2cSd83gA:10 a=-_6uVcgtE8pHcPzIwvgA:9 a=7cmd5gyT0pd2OpG_6YxnCmSL46oA:4 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 59735069; Fri, 10 Dec 2010 19:15:19 +0100 From: Hans Petter Selasky To: Oleg Nauman Date: Fri, 10 Dec 2010 19:15:40 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'( =?iso-8859-1?q?=3B=5FIjlA=3A=0A=09hGE=2E=2EEw?=, =?iso-8859-1?q?XAQ*o=23=5C/M=7ESC=3DS1-f9=7BEzRfT=27=7CHhll5Q=5Dha5Bt-s=7Co?= =?iso-8859-1?q?TlKMusi=3A1e=5BwJl=7Dkd=7DGR=0A=09Z0adGx-x=5F0zGbZj=27e?=(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_M5mANEC8qZagE7a" Message-Id: <201012101915.40878.hselasky@c2i.net> Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: USB related panic on 8.2-PRERELEASE X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2010 18:15:22 -0000 --Boundary-00=_M5mANEC8qZagE7a Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Hi, I think this is a known issue which never got fixed. Please try the attached patch and report back. XXX_SAFE != XXX_REAL_SAFE :-) --HPS On Thursday 09 December 2010 12:02:48 Oleg Nauman wrote: > On Wed, Dec 8, 2010 at 7:05 PM, Oleg Nauman wrote: > > Hello Hans, > > > > On Wed, Dec 8, 2010 at 3:33 PM, Hans Petter Selasky wrote: > >> On Wednesday 08 December 2010 11:41:28 Oleg Nauman wrote: > >>> Hello, > >>> > >>> Unfortunately my notebook experienced the crash during the attempts to > >>> attach EVDO modem supplied with builtin MicroSD cardreader. > >>> Related core.txt file is attached as well as 'usbconfig > >>> dump_all_config_desc' output (all_config.txt) > >>> USB subsystem reports endless USB_ERR_STALLED events during attempts > >>> to attach umass device, but attaches it finally ( sometimes it > >>> attached after two attempts, sometimes it trying to attach during > >>> 15-20 minutes ).MicroSD is inserted there, without any effect on > >>> attachment attempts though. > >> > >> Hi, > >> > >> Can you reproduce the panic using a kernel built with INVARIANTS options > >> and DEBUG_MEMGUARD . > > > > I rebuilt my kernel with options you mentioned ( have added > > INVARIANT_SUPPORT required by INVARIANTS though ) > > > > Waiting on panic.. > > Got it finally ( core.txt file is attached ) > --Boundary-00=_M5mANEC8qZagE7a Content-Type: text/x-patch; charset="iso-8859-15"; name="kern_conf.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="kern_conf.c.patch" === kern_conf.c ================================================================== --- kern_conf.c (revision 215787) +++ kern_conf.c (local) @@ -926,7 +926,7 @@ destroy_devl(struct cdev *dev) { struct cdevsw *csw; - struct cdev_privdata *p, *p1; + struct cdev_privdata *p; mtx_assert(&devmtx, MA_OWNED); KASSERT(dev->si_flags & SI_NAMED, @@ -974,7 +974,7 @@ dev_unlock(); notify_destroy(dev); mtx_lock(&cdevpriv_mtx); - LIST_FOREACH_SAFE(p, &cdev2priv(dev)->cdp_fdpriv, cdpd_list, p1) { + while ((p = LIST_FIRST(&cdev2priv(dev)->cdp_fdpriv)) != NULL) { devfs_destroy_cdevpriv(p); mtx_lock(&cdevpriv_mtx); } --Boundary-00=_M5mANEC8qZagE7a--