瀏覽代碼

ARM: smp: avoid incrementing mm_users on CPU startup

We should not be incrementing mm_users when we startup a secondary
CPU - doing so results in mm_users incrementing by one each time we
hotplug a CPU, which will eventually wrap, and will cause problems.

Other architectures such as x86 do not increment mm_users, but only
mm_count, so we follow that pattern.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King 14 年之前
父節點
當前提交
1ae1b5f053
共有 1 個文件被更改,包括 0 次插入1 次删除
  1. 0 1
      arch/arm/kernel/smp.c

+ 0 - 1
arch/arm/kernel/smp.c

@@ -310,7 +310,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
 	 * All kernel threads share the same mm context; grab a
 	 * All kernel threads share the same mm context; grab a
 	 * reference and switch to it.
 	 * reference and switch to it.
 	 */
 	 */
-	atomic_inc(&mm->mm_users);
 	atomic_inc(&mm->mm_count);
 	atomic_inc(&mm->mm_count);
 	current->active_mm = mm;
 	current->active_mm = mm;
 	cpumask_set_cpu(cpu, mm_cpumask(mm));
 	cpumask_set_cpu(cpu, mm_cpumask(mm));