Re: ACPI 'driver bug: Unable to set devclass'

From: John Baldwin <jhb_at_freebsd.org>
Date: Thu, 24 May 2012 12:25:07 -0400
On Thursday, May 24, 2012 2:15:26 am Andriy Gapon wrote:
> 
> Now that you committed the acpi_cpu fix I'd like to do the easy part -
> protection from the problem in the future.
> Does the following look OK?
> 
> Index: sys/kern/subr_bus.c
> ===================================================================
> --- sys/kern/subr_bus.c	(revision 235884)
> +++ sys/kern/subr_bus.c	(working copy)
> _at__at_ -1810,6 +1810,8 _at__at_
> 
>  	PDEBUG(("%s at %s with order %u as unit %d",
>  	    name, DEVICENAME(dev), order, unit));
> +	KASSERT(name != NULL || unit == -1,
> +	    ("child device with wildcard name and specific unit number"));
> 
>  	child = make_device(dev, name, unit);
>  	if (child == NULL)

Yes, please do!

-- 
John Baldwin
Received on Thu May 24 2012 - 14:37:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:27 UTC