From owner-freebsd-current@FreeBSD.ORG Wed Jul 28 17:09:29 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 BA0311065674; Wed, 28 Jul 2010 17:09:29 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id CCD978FC18; Wed, 28 Jul 2010 17:09:28 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA08519; Wed, 28 Jul 2010 20:09:26 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4C506445.3040908@icyb.net.ua> Date: Wed, 28 Jul 2010 20:09:25 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100517) MIME-Version: 1.0 To: pyunyh@gmail.com References: <20100726132451.GA18443@mech-cluster241.men.bris.ac.uk> <1280226205.78791.0.camel@buffy.york.ac.uk> <20100727115831.GA46325@mech-cluster241.men.bris.ac.uk> <1280238737.78791.20.camel@buffy.york.ac.uk> <20100727144703.GA46905@mech-cluster241.men.bris.ac.uk> <1280249605.78791.36.camel@buffy.york.ac.uk> <4C502D22.10800@icyb.net.ua> <20100728165917.GA7479@michelle.cdnetworks.com> In-Reply-To: <20100728165917.GA7479@michelle.cdnetworks.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Gavin Atkinson , freebsd-current@freebsd.org Subject: Re: free(sc, M_DEVBUF) [Was: amd64 panic snd_hda - hdac_get_capabilities: Invalid corb size (0)] 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: Wed, 28 Jul 2010 17:09:29 -0000 on 28/07/2010 19:59 Pyun YongHyeon said the following: > > When I started to write snd_audiocs(4) for sparc64 I also noticed > that. The practice of sound driver was to explicitly allocate softc > structure in device attach routine and release it after use. I > don't remember details but other parts of sound subsystem seemed to > rely on the structure and changing it to use standard > device_get_softc(9) was not easy task. Oh, I see what you mean. So those drivers do malloc their softc. snd_hda was (is) the only one that got it via device_get_softc, but still used free(9) on it in the case of attachment failure. -- Andriy Gapon