Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758107Ab3CTPsX (ORCPT ); Wed, 20 Mar 2013 11:48:23 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:64772 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757461Ab3CTPsU (ORCPT ); Wed, 20 Mar 2013 11:48:20 -0400 Date: Wed, 20 Mar 2013 08:48:14 -0700 From: Tejun Heo To: Lai Jiangshan Cc: laijs@cn.fujitsu.com, axboe@kernel.dk, jack@suse.cz, fengguang.wu@intel.com, jmoyer@redhat.com, zab@redhat.com, linux-kernel@vger.kernel.org, herbert@gondor.hengli.com.au, davem@davemloft.net, linux-crypto@vger.kernel.org Subject: Re: [PATCH 01/10] workqueue: add wq_numa_tbl_len and wq_numa_possible_cpumask[] Message-ID: <20130320154814.GY3042@htj.dyndns.org> References: <1363737629-16745-1-git-send-email-tj@kernel.org> <1363737629-16745-2-git-send-email-tj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1184 Lines: 25 On Wed, Mar 20, 2013 at 11:43:30PM +0800, Lai Jiangshan wrote: > > + for_each_node(node) > > + BUG_ON(!alloc_cpumask_var_node(&wq_numa_possible_cpumask[node], > > + GFP_KERNEL, node)); > > + for_each_possible_cpu(cpu) { > > + node = cpu_to_node(cpu); > > + if (WARN_ON(node == NUMA_NO_NODE)) { > > + pr_err("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n", cpu); > > since you used WARN_ON(), not BUG_ON(), I think you need to free > allocated memory here. I don't know. Is it necessary? It shouldn't happen sans bugs in arch code and we're vomiting warning message with full stack trace. The system will function but something is seriously screwed. I don't think it matters whether we free the puny number of bytes there or not and I don't wanna nest deeper there. :P -- tejun -- 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/