From owner-svn-src-head@FreeBSD.ORG Wed Dec 30 22:37:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AA9C106568B; Wed, 30 Dec 2009 22:37:28 +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 590A18FC17; Wed, 30 Dec 2009 22:37:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBUMbSjU074749; Wed, 30 Dec 2009 22:37:28 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBUMbSvc074747; Wed, 30 Dec 2009 22:37:28 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200912302237.nBUMbSvc074747@svn.freebsd.org> From: John Baldwin Date: Wed, 30 Dec 2009 22:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201287 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2009 22:37:28 -0000 Author: jhb Date: Wed Dec 30 22:37:28 2009 New Revision: 201287 URL: http://svn.freebsd.org/changeset/base/201287 Log: Actually set RLE_ALLOCATED when allocating a reserved resource so that resource_list_release() will later release the resource instead of failing. Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Wed Dec 30 22:34:26 2009 (r201286) +++ head/sys/kern/subr_bus.c Wed Dec 30 22:37:28 2009 (r201287) @@ -3063,12 +3063,12 @@ resource_list_alloc(struct resource_list if (rle->flags & RLE_RESERVED) { if (rle->flags & RLE_ALLOCATED) return (NULL); - else if ((flags & RF_ACTIVE) && + if ((flags & RF_ACTIVE) && bus_activate_resource(child, type, *rid, rle->res) != 0) return (NULL); - else - return (rle->res); + rle->flags |= RLE_ALLOCATED; + return (rle->res); } panic("resource_list_alloc: resource entry is busy"); }