svn commit: r222750 - head/sys/kern
John Baldwin
jhb at FreeBSD.org
Mon Jun 6 13:12:56 UTC 2011
Author: jhb
Date: Mon Jun 6 13:12:56 2011
New Revision: 222750
URL: http://svn.freebsd.org/changeset/base/222750
Log:
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.
PR: kern/115371
Submitted by: Arthur Hartwig
MFC after: 1 week
Modified:
head/sys/kern/subr_rman.c
Modified: head/sys/kern/subr_rman.c
==============================================================================
--- head/sys/kern/subr_rman.c Mon Jun 6 12:55:19 2011 (r222749)
+++ head/sys/kern/subr_rman.c Mon Jun 6 13:12:56 2011 (r222750)
@@ -839,6 +839,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