Date: Mon, 24 Jun 2013 21:01:46 -0500 From: Brooks Davis <brooks@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: Warner Losh <imp@freebsd.org>, new-bus@freebsd.org Subject: Re: [PATCH] Change the PCI bus driver to free resources leaked by drivers Message-ID: <20130625020146.GD70873@lor.one-eyed-alien.net> In-Reply-To: <201306241659.15119.jhb@freebsd.org> References: <201306241659.15119.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--4zI0WCX1RcnW9Hbu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 24, 2013 at 04:59:14PM -0400, John Baldwin wrote: > Currently our driver model trusts drivers to DTRT and properly release an= y=20 > resources they allocated during probe() and attach(). I've added a new > resource_list() helper method to release active resources on a resource > list and used this to write a pci_child_detached() which cleans up any > active resources when a device fails to probe or a driver finishes > detach. It also fixes an issue where we did not power down devices when > the driver was detached (e.g. via kldunload). I've tested the resource > bits by writing a dummy driver that intentionally attached to an unattach= ed > device and leaked a memory BAR and verified that the bus warned about the > leak and cleaned it up. Looks good in a quick review. -- Brooks --4zI0WCX1RcnW9Hbu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD4DBQFRyPoJXY6L6fI4GtQRApuZAKCGpXOYhJ0ikxGJyphcaD0GX7e7qgCYioGO IbYycfp8cu+VzEz7Cwt06Q== =20CY -----END PGP SIGNATURE----- --4zI0WCX1RcnW9Hbu--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130625020146.GD70873>