浏览代码

x86,percpu: fix inverted NUMA test in setup_pcpu_remap()

setup_percpu_remap() is for NUMA machines yet it bailed out with
-EINVAL if pcpu_need_numa().  Fix the inverted condition.

This problem was reported by David Miller and verified by Yinhai Lu.

Reported-by: David Miller <davem@davemloft.net>
Reported-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
LKML-Reference: <49D30469.8020006@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tejun Heo 16 年之前
父节点
当前提交
eb12ce60c8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/x86/kernel/setup_percpu.c

+ 1 - 1
arch/x86/kernel/setup_percpu.c

@@ -162,7 +162,7 @@ static ssize_t __init setup_pcpu_remap(size_t static_size)
 	 * If large page isn't supported, there's no benefit in doing
 	 * If large page isn't supported, there's no benefit in doing
 	 * this.  Also, on non-NUMA, embedding is better.
 	 * this.  Also, on non-NUMA, embedding is better.
 	 */
 	 */
-	if (!cpu_has_pse || pcpu_need_numa())
+	if (!cpu_has_pse || !pcpu_need_numa())
 		return -EINVAL;
 		return -EINVAL;
 
 
 	last = NULL;
 	last = NULL;