Date: Fri, 02 Dec 2011 16:24:37 -0500 From: John Baldwin <jhb@FreeBSD.org> To: Marius Strobl <marius@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228209 - head/sys/kern Message-ID: <4ED94215.7030109@FreeBSD.org> In-Reply-To: <201112022119.pB2LJEqJ009294@svn.freebsd.org> References: <201112022119.pB2LJEqJ009294@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ED94215.7030109>