]> git.baikalelectronics.ru Git - kernel.git/commit
percpu: fix first chunk match in per_cpu_ptr_to_phys()
authorTejun Heo <tj@kernel.org>
Fri, 18 Jun 2010 09:44:31 +0000 (11:44 +0200)
committerTejun Heo <tj@kernel.org>
Fri, 18 Jun 2010 13:07:23 +0000 (15:07 +0200)
commit305ecc2251208881dffa3f9a604130f38795a364
treea9b7bacbdf8e30b931c2ebd849104b04b157d48d
parentc8f8358ec44ff43b664bd9d4a50d6b07f9576861
percpu: fix first chunk match in per_cpu_ptr_to_phys()

per_cpu_ptr_to_phys() determines whether the passed in @addr belongs
to the first_chunk or not by just matching the address against the
address range of the base unit (unit0, used by cpu0).  When an adress
from another cpu was passed in, it will always determine that the
address doesn't belong to the first chunk even when it does.  This
makes the function return a bogus physical address which may lead to
crash.

This problem was discovered by Cliff Wickman while investigating a
crash during kdump on a SGI UV system.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Cliff Wickman <cpw@sgi.com>
Tested-by: Cliff Wickman <cpw@sgi.com>
Cc: stable@kernel.org
mm/percpu.c