From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH] Do not use cpu_to_node() to find an offlined cpu's node. Date: Tue, 09 Oct 2012 12:57:36 +0200 Message-ID: <1349780256.7880.12.camel@twins> References: <1349665183-11718-1-git-send-email-tangchen@cn.fujitsu.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT Return-path: In-Reply-To: <1349665183-11718-1-git-send-email-tangchen@cn.fujitsu.com> Sender: linux-numa-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Tang Chen Cc: mingo@redhat.com, miaox@cn.fujitsu.com, wency@cn.fujitsu.com, linux-kernel@vger.kernel.org, linux-numa@vger.kernel.org, David Rientjes On Mon, 2012-10-08 at 10:59 +0800, Tang Chen wrote: > If a cpu is offline, its nid will be set to -1, and cpu_to_node(cpu) will > return -1. As a result, cpumask_of_node(nid) will return NULL. In this case, > find_next_bit() in for_each_cpu will get a NULL pointer and cause panic. Hurm,. this is new, right? Who is changing all these semantics without auditing the tree and informing all affected people?