svn commit: r273221 - in stable: 10/sys/kern 9/sys/kern

John Baldwin jhb at FreeBSD.org
Fri Oct 17 15:29:49 UTC 2014


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) {


More information about the svn-src-stable-9 mailing list