From owner-svn-src-all@FreeBSD.ORG Fri Sep 26 18:37:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F016F4C; Fri, 26 Sep 2014 18:37:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AC9F278; Fri, 26 Sep 2014 18:37:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8QIbo9Q013639; Fri, 26 Sep 2014 18:37:50 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8QIboUl013638; Fri, 26 Sep 2014 18:37:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409261837.s8QIboUl013638@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 26 Sep 2014 18:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272182 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Fri, 26 Sep 2014 18:37:50 -0000 Author: jhb Date: Fri Sep 26 18:37:49 2014 New Revision: 272182 URL: http://svnweb.freebsd.org/changeset/base/272182 Log: Don't panic if a resource is allocated twice. Instead, print a warning and fail the allocation request. Allocations of "reserved" resources such as PCI BARs already fail the request instead of panic'ing in this case. MFC after: 1 week Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Fri Sep 26 15:16:53 2014 (r272181) +++ head/sys/kern/subr_bus.c Fri Sep 26 18:37:49 2014 (r272182) @@ -3302,7 +3302,10 @@ resource_list_alloc(struct resource_list rle->flags |= RLE_ALLOCATED; return (rle->res); } - panic("resource_list_alloc: resource entry is busy"); + device_printf(bus, + "resource entry %#x type %d for child %s is busy\n", *rid, + type, device_get_nameunit(child)); + return (NULL); } if (isdefault) {