Date: Wed, 28 Jul 2010 20:09:25 +0300 From: Andriy Gapon <avg@icyb.net.ua> To: pyunyh@gmail.com Cc: Gavin Atkinson <gavin@freebsd.org>, freebsd-current@freebsd.org Subject: Re: free(sc, M_DEVBUF) [Was: amd64 panic snd_hda - hdac_get_capabilities: Invalid corb size (0)] Message-ID: <4C506445.3040908@icyb.net.ua> In-Reply-To: <20100728165917.GA7479@michelle.cdnetworks.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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C506445.3040908>