x86/cpu_entry_area: Prevent wraparound in setup_cpu_entry_area_ptes() on 32bit
The loop which populates the CPU entry area PMDs can wrap around on 32bit machines when the number of CPUs is small. It worked wonderful for NR_CPUS=64 for whatever reason and the moron who wrote that code did not bother to test it with !SMP. Check for the wraparound to fix it. Fixes: 92a0f81d ("x86/cpu_entry_area: Move it out of the fixmap") Reported-by: Nkernel test robot <fengguang.wu@intel.com> Signed-off-by: NThomas "Feels stupid" Gleixner <tglx@linutronix.de> Tested-by: NBorislav Petkov <bp@alien8.de>
Showing
想要评论请 注册 或 登录