lkml.org 
[lkml]   [2009]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] percpu: fix unit_map[] verification in pcpu_setup_first_chunk()
Tejun Heo wrote:
> Christoph Lameter wrote:
>> 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.
>
> Heh.. that's not what's broken. unit# can legally go over NR_CPUS or
> nr_cpu_ids as cpus can be sparsely mapped to units. The problem is
> that
^
I'm delusional at the moment. :-)

Christoph, can you please elaborate why nr_cpu_ids < NR_CPUS is
broken?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2009-09-28 18:41    [from the cache]
©2003-2011 Jasper Spaans