Re: [scheduler] BUG: unable to handle kernel paging request at 000000000000ce50

From: Christoph Lameter
Date: Fri Aug 01 2014 - 09:58:58 EST


On Thu, 31 Jul 2014, Lai Jiangshan wrote:

> > this_cpu_ptr instead.
>
>
> - struct cpumask *cpus = __get_cpu_var(load_balance_mask);
> + struct cpumask *cpus = this_cpu_ptr(load_balance_mask);
>
>
> I think the conversion is wrong. it should be
> *this_cpu_ptr(&load_balance_mask);

Hmmm.... that is going to cause some pretty strange looking code. Would
the compiler/sparse not complain if the wrong type of pointer is assigned
to?


If we are retrieving a pointer then the right way to do things would be:

cpus = this_cpu_read(load_balance_mask);



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/