Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932436AbWEVGBg (ORCPT ); Mon, 22 May 2006 02:01:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932460AbWEVGBf (ORCPT ); Mon, 22 May 2006 02:01:35 -0400 Received: from lmcgw.cs.sunysb.edu ([130.245.128.4]:55785 "EHLO smtp.lmc.cs.sunysb.edu") by vger.kernel.org with ESMTP id S932436AbWEVGBf (ORCPT ); Mon, 22 May 2006 02:01:35 -0400 Date: Mon, 22 May 2006 02:01:33 -0400 From: Giridhar Pemmasani To: Arjan van de Ven Cc: linux-kernel@vger.kernel.org Subject: Re: __vmalloc with GFP_ATOMIC causes 'sleeping from invalid context' In-Reply-To: <1148262697.3902.55.camel@laptopd505.fenrus.org> References: <20060522013648.6FCEAEE9EE@wolfe.lmc.cs.sunysb.edu> <1148262697.3902.55.camel@laptopd505.fenrus.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 MULE XEmacs/21.4 (patch 19) (Constant Variable) (i386-debian-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Message-Id: <20060522060133.91683EE9EE@wolfe.lmc.cs.sunysb.edu> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1104 Lines: 27 On Mon, 22 May 2006 03:51:37 +0200, Arjan van de Ven said: > On Sun, 2006-05-21 at 21:36 -0400, Giridhar Pemmasani wrote: >> If __vmalloc is called in atomic context with GFP_ATOMIC flags, >> __get_vm_area_node is called, which calls kmalloc_node with >> GFP_KERNEL flags. This causes 'sleeping function called from >> invalid context at mm/slab.c:2729' with 2.6.16-rc4 kernel. A >> simple solution is to use proper flags in __get_vm_area_node, >> depending on the context: > vmalloc sleeps, or at least does things to the lower vm layers > that really do sleepy things. So calling it from an atomic > context really tends to be a bug.... > where in the kernel is this done? It is not about vmalloc, but about __vmalloc. I gave more details in response to Nick Piggin's reply on this thread. Thanks, Giri - 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/