Date: Thu, 24 May 2012 12:25:07 -0400 From: John Baldwin <jhb@freebsd.org> To: Andriy Gapon <avg@freebsd.org> Cc: freebsd-current <freebsd-current@freebsd.org> Subject: Re: ACPI 'driver bug: Unable to set devclass' Message-ID: <201205241225.07399.jhb@freebsd.org> In-Reply-To: <4FBDD1FE.4030306@FreeBSD.org> References: <4FAF7343.8010808@cran.org.uk> <201205181045.16675.jhb@freebsd.org> <4FBDD1FE.4030306@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
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)
> @@ -1810,6 +1810,8 @@
>
> 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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205241225.07399.jhb>
