DragonFly BSD
DragonFly commits List (threaded) for 2005-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/dev/pccard/pccbb pccbb.c

From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Fri, 12 Aug 2005 17:55:16 +0200
Mail-followup-to: commits@crater.dragonflybsd.org

On Thu, Aug 11, 2005 at 08:23:30PM +0200, Simon 'corecode' Schubert wrote:
> On 11.08.2005, at 19:33, Matthew Dillon wrote:
> >    Same here.  In this case the malloc clearly should not be
> >    allowed to fail as this code is called as part of the 
> >initialization
> >    phase.  This is a common occurance in FreeBSD code and we've been
> >    changing those M_NOWAIT's to M_INTWAIT's right and left for
> >    initialization phase code.
> But it can fail, like other things in the initialization can fail as 
> well.  All other code copes with failures, except cbb_insert_res.

This code must not fail if possible. One reason is that the callers
might indead be allowed to block and therefore use M_WAITOK, but we
can't do that here. M_INTWAIT dramatically increases the chance of
success and allocating from the interrupt reserve is definitely wanted


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]