Date: Wed, 2 Nov 2011 14:14:38 -0700 From: Navdeep Parhar <nparhar@gmail.com> To: Garrett Cooper <yanegomi@gmail.com> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: incorrect parent refcounting in subr_firmware.c? Message-ID: <CAPFoGT-qNm8oWrZq4B=Xs=zjGaUy3==9yD5UgKTSwJFn3jFpyQ@mail.gmail.com> In-Reply-To: <CAGH67wQ9bsnMGhMs96tC4J26mf=EDJL=MavA0KxnVceH1D6i1A@mail.gmail.com> References: <CAPFoGT9bLzAStkUnSfsBm0F6gmGuCM6kQRHQxa%2Bbsah4mQvQVw@mail.gmail.com> <CAGH67wQ9bsnMGhMs96tC4J26mf=EDJL=MavA0KxnVceH1D6i1A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 2, 2011 at 1:44 PM, Garrett Cooper <yanegomi@gmail.com> wrote: > On Wed, Nov 2, 2011 at 12:56 PM, Navdeep Parhar <nparhar@gmail.com> wrote= : >> I built a KLD with multiple firmware images, as shown here: >> >> KMOD=3Dfoo >> FIRMWS=3D foo.bin:foo:1.0.0.0 >> FIRMWS+=3Dbar.bin:bar:1.0.0.0 >> FIRMWS+=3D ... >> .include <bsd.kmod.mk> >> >> "foo" is the parent firmware and a firmware_get(foo) can autoload the >> KLD. =A0"bar" and the rest are available only if the KLD is loaded (by >> whatever means). =A0This is reasonable and works as expected. =A0But if = I >> just get and then put "foo" back, the KLD is not unloaded automatically. >> >> The problem is that a reference is placed on the parent firmware when >> the other firmwares are registered (during module load). =A0I think this >> reference should be placed during firmware_get on the child. >> >> What do people think about the attached patch? =A0It fixes things for me= . > > =A0 =A0It might be a generic problem; here's a similar (not exactly the > same) issue: http://lists.freebsd.org/pipermail/freebsd-hackers/2010-Augu= st/032714.html That seems to be an entirely different issue. My problem is with the way a "parent" firmware is reference counted.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPFoGT-qNm8oWrZq4B=Xs=zjGaUy3==9yD5UgKTSwJFn3jFpyQ>