From: David Miller <davem@davemloft.net>
Date: Tue, 29 Apr 2008 15:58:24 -0700 (PDT)
Ok, I think I see the problem.
The core issue is that (X << N) is undefined when N is >= the
word size, but that's exactly what the find_next_bit() inline
optimizations do.
This optimization code will trigger on 64-bit if NR_CPUS is set
to 64, and you actually have 64 cpus. It should also occur
on 32-bit if NR_CPUS=32 and you have 32 cpus.
The bogus expansion occurs in lib/cpumask.c:__next_cpu()
After processing cpu 63, we'll use offset==64 and thus try
to make the undefined shift I described above, causing the
caller's cpumask iteration loop to run forever.
This code was really not tested very well at all.
--