Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932586AbWEVHem (ORCPT ); Mon, 22 May 2006 03:34:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932588AbWEVHem (ORCPT ); Mon, 22 May 2006 03:34:42 -0400 Received: from smtp110.mail.mud.yahoo.com ([209.191.85.220]:19900 "HELO smtp110.mail.mud.yahoo.com") by vger.kernel.org with SMTP id S932586AbWEVHem (ORCPT ); Mon, 22 May 2006 03:34:42 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=Received:Message-ID:Date:From:User-Agent:X-Accept-Language:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Br9R8qQDGRKsZ47HzxHQir9BKMBL8+F4UEcGDHSBfNtsn/FVRxcJuijPk2Tae3xf9zLVWfM5QotawwoOTihjwBdPpOHZgoy9ZQCHTKsv7FSk/JM1+jH2z5LeG8MyCRwxwVtD7UEY8b4grPV7mFb9IOU1i5B9FGlQtqRHl91k3hA= ; Message-ID: <44716988.5010902@yahoo.com.au> Date: Mon, 22 May 2006 17:34:32 +1000 From: Nick Piggin User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Debian/1.7.12-1 X-Accept-Language: en MIME-Version: 1.0 To: Giridhar Pemmasani CC: linux-kernel@vger.kernel.org Subject: Re: __vmalloc with GFP_ATOMIC causes 'sleeping from invalid context' References: <20060522013648.6FCEAEE9EE@wolfe.lmc.cs.sunysb.edu> <447119B3.7000506@yahoo.com.au> <20060522055852.63940EE9EE@wolfe.lmc.cs.sunysb.edu> <4471551B.1070701@yahoo.com.au> <447155E5.8060406@yahoo.com.au> <447156AB.30909@yahoo.com.au> <20060522070819.23CC5EE9EE@wolfe.lmc.cs.sunysb.edu> In-Reply-To: <20060522070819.23CC5EE9EE@wolfe.lmc.cs.sunysb.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1257 Lines: 29 Giridhar Pemmasani wrote: > On Mon, 22 May 2006 16:14:03 +1000, Nick Piggin 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/