Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261386AbVAGMW7 (ORCPT ); Fri, 7 Jan 2005 07:22:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261387AbVAGMW7 (ORCPT ); Fri, 7 Jan 2005 07:22:59 -0500 Received: from fest.stud.feec.vutbr.cz ([147.229.9.16]:55819 "EHLO fest.stud.feec.vutbr.cz") by vger.kernel.org with ESMTP id S261386AbVAGMW6 (ORCPT ); Fri, 7 Jan 2005 07:22:58 -0500 Message-ID: <41DE7F20.4010502@stud.feec.vutbr.cz> Date: Fri, 07 Jan 2005 13:22:56 +0100 From: Michal Schmidt User-Agent: Mozilla Thunderbird 0.9 (X11/20041124) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Park Lee CC: linux-kernel@vger.kernel.org Subject: Re: How to understand and turn off such a oops References: <20050107115011.24897.qmail@web51510.mail.yahoo.com> In-Reply-To: <20050107115011.24897.qmail@web51510.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 650 Lines: 19 Park Lee wrote: > Hi, > Sometimes, when I call kmalloc() in Linux kernel, > the kernel always bring out a oops shown as following: > > > Debug: sleeping function called from invalid context > at mm/slab.c:1980 > in_atomic():1, irqs_disabled():0 You're calling kmalloc in a context where sleeping is not allowed. And kmalloc with the GFP_KERNEL flag can sleep. Use GFP_ATOMIC in that context. Michal - 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/