From owner-freebsd-current@FreeBSD.ORG Thu May 24 16:37:02 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 676BE106564A; Thu, 24 May 2012 16:37:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 38CB58FC15; Thu, 24 May 2012 16:37:02 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9574EB95A; Thu, 24 May 2012 12:37:01 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Thu, 24 May 2012 12:25:07 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <4FAF7343.8010808@cran.org.uk> <201205181045.16675.jhb@freebsd.org> <4FBDD1FE.4030306@FreeBSD.org> In-Reply-To: <4FBDD1FE.4030306@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205241225.07399.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 24 May 2012 12:37:01 -0400 (EDT) Cc: freebsd-current Subject: Re: ACPI 'driver bug: Unable to set devclass' X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2012 16:37:02 -0000 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