From aa8ddae28045296cfac5aae264a723e7b0664db7 Mon Sep 17 00:00:00 2001 From: jhb Date: Mon, 6 Jun 2011 13:12:56 +0000 Subject: 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 --- sys/kern/subr_rman.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/kern/subr_rman.c') diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 3014b19..abd72c0 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -839,6 +839,7 @@ int_rman_release_resource(struct rman *rm, struct resource_i *r) * without freeing anything. */ r->r_flags &= ~RF_ALLOCATED; + r->r_dev = NULL; return 0; } -- cgit v1.1