From owner-freebsd-current@FreeBSD.ORG Wed Nov 26 23:56:15 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D3D816A4CE for ; Wed, 26 Nov 2003 23:56:15 -0800 (PST) Received: from Vitsch.net (b74143.upc-b.chello.nl [212.83.74.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6308543FE3 for ; Wed, 26 Nov 2003 23:56:13 -0800 (PST) (envelope-from Danovitsch@Vitsch.net) Received: from FreeBSD.Danovitsch.LAN (b83007.upc-b.chello.nl [212.83.83.7]) by Vitsch.net (8.12.3p2/8.11.3) with ESMTP id hAR7twXe006406; Thu, 27 Nov 2003 08:55:58 +0100 (CET) (envelope-from Danovitsch@Vitsch.net) Content-Type: text/plain; charset="iso-8859-1" From: "Daan Vreeken [PA4DAN]" To: Jay Cornwall Date: Thu, 27 Nov 2003 08:56:44 +0100 User-Agent: KMail/1.4.3 References: <1069874342.704.18.camel@klotz.local> <1069888991.2521.7.camel@klotz.local> <3FC54095.6030209@evilrealms.net> In-Reply-To: <3FC54095.6030209@evilrealms.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200311270856.44214.Danovitsch@Vitsch.net> cc: FreeBSD-current@FreeBSD.org Subject: Re: Panic with ugen X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Thu, 27 Nov 2003 07:56:15 -0000 On Thursday 27 November 2003 01:08, Jay Cornwall wrote: > > It looks like this: > > > > panic() > > destroy_dev() > > ugen_destroy_devnodes() > > ugen_set_config() > > Yes, that's the one, and I think I can see why. The existing code fixed > devfs problems for normal ugen_set_config calls, but doesn't account fo= r > what happens when an error occurs (which is presumably happening in you= r > example program, as you said it gives an error the first time round) - = the > devfs stuff only half completes. > > (actually, looking at that error handling code, it doesn't look like it= 's > been thought through well anyway - /* XXX should only do this after set= ting > new altno has succeeded */ - maybe time to clean this code up?) > > After the device endpoints are destroyed (sys/dev/ugen.c:1038), the ret= urns > on lines 1055 and 1058 need to be covered by a devnode recovery procedu= re - > particularly tricky given we just wiped the endpoint descriptors clean. > > I'll look at restructuring this code tomorrow, if Bernd doesn't beat me= to > it. If you have time left, could you perhaps also have a look at kern/51186? I have filed it back in March and it's still open. (Fixes a memory corrup= tion=20 bug in ugen). grtz, Daan