Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978Ab3EOF1s (ORCPT ); Wed, 15 May 2013 01:27:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51991 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751186Ab3EOF1r (ORCPT ); Wed, 15 May 2013 01:27:47 -0400 Message-ID: <51930FCD.3090001@redhat.com> Date: Wed, 15 May 2013 12:32:13 +0800 From: Lingzhu Xiang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Tejun Heo CC: CAI Qian , linux-mm , LKML Subject: Re: 3.9.0: panic during boot - kernel BUG at include/linux/gfp.h:323! References: <22600323.7586117.1367826906910.JavaMail.root@redhat.com> <5191B101.1070000@redhat.com> <20130514183500.GN6795@mtj.dyndns.org> In-Reply-To: <20130514183500.GN6795@mtj.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1450 Lines: 40 On 05/15/2013 02:35 AM, Tejun Heo wrote: > Hello, > > On Tue, May 14, 2013 at 11:35:29AM +0800, Lingzhu Xiang wrote: >> On 05/06/2013 03:55 PM, CAI Qian wrote: >>> [ 0.928031] ------------[ cut here ]------------ >>> [ 0.934231] kernel BUG at include/linux/gfp.h:323! > ... >>> [ 1.662913] [] alloc_cpumask_var_node+0x28/0x90 >>> [ 1.671224] [] wq_numa_init+0x10d/0x1be >>> [ 1.686085] [] init_workqueues+0x64/0x341 > > Does the following patch make the problem go away? The dynamic paths > should be safe as they are synchronized against CPU hot plug paths and > don't allocate anything on nodes w/o any CPUs. Yes, no more panics. > diff --git a/kernel/workqueue.c b/kernel/workqueue.c > index 4aa9f5b..232c1bb 100644 > --- a/kernel/workqueue.c > +++ b/kernel/workqueue.c > @@ -4895,7 +4895,8 @@ static void __init wq_numa_init(void) > BUG_ON(!tbl); > > for_each_node(node) > - BUG_ON(!alloc_cpumask_var_node(&tbl[node], GFP_KERNEL, node)); > + BUG_ON(!alloc_cpumask_var_node(&tbl[node], GFP_KERNEL, > + node_online(node) ? node : NUMA_NO_NODE)); > > for_each_possible_cpu(cpu) { > node = cpu_to_node(cpu); > -- 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/