Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jun 2011 18:54:31 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r223092 - stable/8/sys/kern
Message-ID:  <201106141854.p5EIsVBo047359@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106141854.p5EIsVBo047359>