From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 21:24:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF193106564A; Fri, 2 Dec 2011 21:24:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 866468FC13; Fri, 2 Dec 2011 21:24:38 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 3C02D46B06; Fri, 2 Dec 2011 16:24:38 -0500 (EST) Received: from John-Baldwins-MacBook-Air.local (c-68-36-150-83.hsd1.nj.comcast.net [68.36.150.83]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id ACF8DB91E; Fri, 2 Dec 2011 16:24:37 -0500 (EST) Message-ID: <4ED94215.7030109@FreeBSD.org> Date: Fri, 02 Dec 2011 16:24:37 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Marius Strobl References: <201112022119.pB2LJEqJ009294@svn.freebsd.org> In-Reply-To: <201112022119.pB2LJEqJ009294@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 02 Dec 2011 16:24:37 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228209 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 21:24:38 -0000 On 12/2/11 4:19 PM, Marius Strobl wrote: > Author: marius > Date: Fri Dec 2 21:19:14 2011 > New Revision: 228209 > URL: http://svn.freebsd.org/changeset/base/228209 > > Log: > - In device_probe_child(9) check the return value of device_set_driver(9) > when actually setting a driver as especially ENOMEM is fatal in these > cases. > - Annotate other calls to device_set_devclass(9) and device_set_driver(9) > without the return value being checked and that are okay to fail. > > Reviewed by: yongari (slightly earlier version) Hmm, I've always thought that new-bus overused M_NOWAIT. There are a few places where M_NOWAIT might be appropriate (e.g. from pccbb's interrupt routine when a cardbus card is inserted), but the boot time probe can certainly use M_WAITOK instead. Even the pccbb case could use M_WAITOK if it were simply deferred to a taskqueue (which it probably should be anyway, probing and attaching a driver to a new card is far too expensive to do directly from an interrupt handler). -- John Baldwin