Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752858AbZI1QaM (ORCPT ); Mon, 28 Sep 2009 12:30:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752741AbZI1QaM (ORCPT ); Mon, 28 Sep 2009 12:30:12 -0400 Received: from smtp2.ultrahosting.com ([74.213.174.253]:52971 "EHLO smtp.ultrahosting.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752639AbZI1QaL (ORCPT ); Mon, 28 Sep 2009 12:30:11 -0400 Date: Mon, 28 Sep 2009 12:25:16 -0400 (EDT) From: Christoph Lameter X-X-Sender: cl@gentwo.org To: Tejun Heo cc: Tony Vroon , Linux Kernel , Rusty Russell , Ingo Molnar , "H. Peter Anvin" Subject: Re: [PATCH] percpu: fix unit_map[] verification in pcpu_setup_first_chunk() In-Reply-To: <4AC0E201.2020006@kernel.org> Message-ID: References: <4ABAC2F1.3020302@kernel.org> <1254055797.2756.1.camel@localhost> <4AC0E201.2020006@kernel.org> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 799 Lines: 17 On Tue, 29 Sep 2009, Tejun Heo wrote: > pcpu_setup_first_chunk() incorrectly used NR_CPUS as the impossible > unit number while unit number can equal and go over NR_CPUS with > sparse unit map. This triggers BUG_ON() spuriously on machines which > have non-power-of-two number of cpus. Use UINT_MAX instead. Uhhh. Funky. The assumption nr_cpu_ids < NR_CPUS has been broken. Wonder what other effects that will have. In particular since the slab and page allocators have arrays indexed by the cpu number and those arrays are dimensioned for NR_CPUS. -- 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/