Date: Fri, 17 Oct 2014 15:29:48 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r273221 - in stable: 10/sys/kern 9/sys/kern Message-ID: <201410171529.s9HFTmXt008324@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Oct 17 15:29:47 2014 New Revision: 273221 URL: https://svnweb.freebsd.org/changeset/base/273221 Log: MFC 272182: 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. Modified: stable/9/sys/kern/subr_bus.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/subr_bus.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/subr_bus.c ============================================================================== --- stable/9/sys/kern/subr_bus.c Fri Oct 17 15:07:04 2014 (r273220) +++ stable/9/sys/kern/subr_bus.c Fri Oct 17 15:29:47 2014 (r273221) @@ -3232,7 +3232,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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410171529.s9HFTmXt008324>