lkml.org 
[lkml]   [2006]   [May]   [22]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 22 May 2006 17:34:32 +1000
FromNick Piggin <>
SubjectRe: __vmalloc with GFP_ATOMIC causes 'sleeping from invalid context'
Giridhar Pemmasani wrote:
> On Mon, 22 May 2006 16:14:03 +1000, Nick Piggin <nickpiggin@yahoo.com.au> said:
> 
>    > Nick Piggin wrote:
> 
>   >> OTOH, it doesn't seem to be particularly wrong to allow __vmalloc
>   >> GFP_ATOMIC allocations. The correct fix is to pass the gfp_mask
>   >> to kmalloc: if you're worried about breaking the API, introduce a
>   >> new __get_vm_area_node_mask() and implement __get_vm_area_node()
>   >> as a simple wrapper that passes in GFP_KERNEL.
> 
>    > Oh, and __get_vm_area_node{_mask} should BUG_ON(in_interrupt());
> 
> With the patch I sent earlier, this may not be required: Since
> __get_vm_area_node calls kmalloc, it should be taken care of in
> kmalloc and friends. Currently cache_alloc_debugcheck_before doesn't
> check for in_interrupt(); perhaps that is the right place to add

vmlist_lock is not irq safe. If you call it from interrupt, you can
deadlock.

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

-
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: 2006-05-22 09:37    [from the cache]
©2003-2008