From owner-freebsd-usb@FreeBSD.ORG Tue Mar 29 09:21:39 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5D6B16A4CE for ; Tue, 29 Mar 2005 09:21:39 +0000 (GMT) Received: from md2.swissinfo.org (md2.swissinfo.org [146.159.4.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA81743D2F for ; Tue, 29 Mar 2005 09:21:38 +0000 (GMT) (envelope-from sebastien.b@swissinfo.org) Received: from mail.swissinfo.org ([194.6.181.33]) by md2.swissinfo.org (phad2.swissinfo.org [146.159.6.10]) (MDaemon.PRO.v7.2.1.R) with ESMTP id 26-md50000318695.msg for ; Tue, 29 Mar 2005 11:13:05 +0200 Received: from AAmiens-152-1-30-22.w83-192.abo.wanadoo.fr (83.192.205.22) by mail.swissinfo.org (7.0.020) (authenticated as sebastien.b) id 4153942002C9B7B3; Sun, 27 Mar 2005 12:46:58 +0200 From: Sebastien B To: ticso@cicely.de Date: Sun, 27 Mar 2005 11:47:02 +0000 User-Agent: KMail/1.8 References: <200503261558.21943.sebastien.b@swissinfo.org> <200503262158.32320.sebastien.b@swissinfo.org> <20050326233214.GM14532@cicely12.cicely.de> In-Reply-To: <20050326233214.GM14532@cicely12.cicely.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503271147.03573.sebastien.b@swissinfo.org> X-Spam-Processed: phad2.swissinfo.org, Tue, 29 Mar 2005 11:13:05 +0200 (not processed: spam filter disabled) X-MDRemoteIP: 194.6.181.33 X-Return-Path: sebastien.b@swissinfo.org X-MDaemon-Deliver-To: freebsd-usb@freebsd.org X-MDAV-Processed: phad2.swissinfo.org, Tue, 29 Mar 2005 11:21:30 +0200 cc: freebsd-usb@freebsd.org Subject: Re: What's the right way to wait for an USB transfer to complete ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2005 09:21:39 -0000 Hello, > Havn't looked at your code yet, but the panic is by accessing a > memory location near address 0, so it's very likely that you are > accesing a structure member from a NULL pointer. > A stack trace from kernel debugger should easily tell you which > function made the access Yes, I already did that ; the panic is inside propagate_priority, called by turnstile_wait. Really confusing :-( > > You mean I must hold Giant every time I call any USB function ? I've > > never seen any driver doing this... > > Yes - holding GIANT ist required. > You don't see this because currently all USB drivers are already > entered with GIANT held. Ok, thanks for the info. I'll lock Giant in the software interrupt handlers which access USB, maybe the crash is because of that (race condition damaging kernel structures ?) Regards, Sebastien