lkml.org 
[lkml]   [2005]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: kmalloc without GFP_xxx?
From
Date
On Wed, 2005-06-29 at 14:20 +0300, Denis Vlasenko wrote:
> On Wednesday 29 June 2005 14:15, Arjan van de Ven wrote:
> > On Wed, 2005-06-29 at 14:02 +0300, Denis Vlasenko wrote:
> > > Hi,
> > > It struck me that kernel actually can figure out whether it's okay
> > > to sleep or not by looking at combination of (flags & __GFP_WAIT)
> > > and ((in_atomic() || irqs_disabled()) as it already does this for
> > > might_sleep() barfing:
> >
> > that is not enough.
> >
> > you could be holding a spinlock for example!
> >
> > (and no that doesn't set in_atomic() always)
>
> but it sets irqs_disabled() IIRC.

only spin_lock_irq() and co do.
not the simple spin_lock()


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-29 13:41    [W:0.070 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site