svn commit: r223093 - stable/7/sys/kern
John Baldwin
jhb at FreeBSD.org
Tue Jun 14 18:54:42 UTC 2011
Author: jhb
Date: Tue Jun 14 18:54:42 2011
New Revision: 223093
URL: http://svn.freebsd.org/changeset/base/223093
Log:
MFC 222750:
Clear the device_t pointer in 'struct resource' when releasing a device
as otherwise the sysctl to export rman info can dereference a stale
pointer.
Modified:
stable/7/sys/kern/subr_rman.c
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/cddl/contrib/opensolaris/ (props changed)
stable/7/sys/contrib/dev/acpica/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/kern/subr_rman.c
==============================================================================
--- stable/7/sys/kern/subr_rman.c Tue Jun 14 18:54:31 2011 (r223092)
+++ stable/7/sys/kern/subr_rman.c Tue Jun 14 18:54:42 2011 (r223093)
@@ -677,6 +677,7 @@ int_rman_release_resource(struct rman *r
* without freeing anything.
*/
r->r_flags &= ~RF_ALLOCATED;
+ r->r_dev = NULL;
return 0;
}
More information about the svn-src-stable
mailing list