svn commit: r223092 - stable/8/sys/kern

John Baldwin jhb at FreeBSD.org
Tue Jun 14 18:54:32 UTC 2011


Author: jhb
Date: Tue Jun 14 18:54:31 2011
New Revision: 223092
URL: http://svn.freebsd.org/changeset/base/223092

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/8/sys/kern/subr_rman.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/subr_rman.c
==============================================================================
--- stable/8/sys/kern/subr_rman.c	Tue Jun 14 18:19:48 2011	(r223091)
+++ stable/8/sys/kern/subr_rman.c	Tue Jun 14 18:54:31 2011	(r223092)
@@ -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-all mailing list