Date: Tue, 9 Apr 2002 23:50:20 +0200 From: Thomas Quinot <thomas@cuivre.fr.eu.org> To: freebsd-scsi@freebsd.org Subject: Re: xpt_bus_deregister Message-ID: <20020409235020.A2397@melusine.cuivre.fr.eu.org> In-Reply-To: <20020409094509.A4569@melusine.cuivre.fr.eu.org>; from thomas@melusine.cuivre.fr.eu.org on Tue, Apr 09, 2002 at 09:45:09AM %2B0200 References: <20020409094509.A4569@melusine.cuivre.fr.eu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Le 2002-04-09, Thomas Quinot écrivait : > problem with xpt_bus_deregister. Apparently, there is one reference > to the bus which is counted but never released. As a consequence, > a call to xpt_bus_deregister(cam_sim_path(scp->sim)) will not actually > remove the bus from xpt_busses, and of course a subsequent cam_sim_free > destroys the SIM with extreme prejudice. > > Any idea where I should start looking for this reference leak? OK, I think I found it. When attaching the SIM, I setup an async callback on AC_LOST_DEVICE. This callback counts as a reference to the wildcard device, which prevents the release of the wildcard target, and therefore of the bus. Disabling the callback before calling xpt_bus_deregister & al. resolved the problem. I suspect that this problem is dormant in many other SCSI host adapter drivers. Do others have experience with removing a SIM from a running system? Thomas. -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020409235020.A2397>