x86-64, NUMA: Don't call __pa() with invalid address in numa_reset_distance()
authorYinghai Lu <yinghai@kernel.org>
Thu, 17 Feb 2011 13:46:37 +0000 (14:46 +0100)
committerTejun Heo <tj@kernel.org>
Thu, 17 Feb 2011 14:03:43 +0000 (15:03 +0100)
commit2ca230baeb7c61864cab9b53e37a3da28a2ca7e5
tree961a13fca73f866363f3da26506eb1c4455d9386
parente23bba604433a202cd301a976454a90ea6b783ef
x86-64, NUMA: Don't call __pa() with invalid address in numa_reset_distance()

Do not call __pa(numa_distance) if it was not allocated before.
Calling with invalid address triggers VIRTUAL_BUG_ON() in
__phys_addr() if CONFIG_DEBUG_VIRTUAL.

Also reported by Ingo.

 http://thread.gmane.org/gmane.linux.kernel/1101306/focus=1101785

- v2: Change to check existing path as tj requested.
- tj: Description update.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/numa_64.c