From owner-svn-src-all@FreeBSD.ORG Tue Jun 14 18:54:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F03691065670; Tue, 14 Jun 2011 18:54:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E031C8FC13; Tue, 14 Jun 2011 18:54:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5EIsVEE047361; Tue, 14 Jun 2011 18:54:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5EIsVBo047359; Tue, 14 Jun 2011 18:54:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201106141854.p5EIsVBo047359@svn.freebsd.org> From: John Baldwin Date: Tue, 14 Jun 2011 18:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223092 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2011 18:54:32 -0000 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; }