]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Fix bit corruption at CPU resume time
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 May 2013 18:36:03 +0000 (11:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 May 2013 18:36:03 +0000 (11:36 -0700)
commit046a1c47c49d89366f429ee6bbe3dfcff898d49f
tree27c9fe1bf6026f4c5f50ce89ab7dd1c4f7e9c235
parent174723f04325e60c3f5f8dee7a2e64d906875d9e
x86: Fix bit corruption at CPU resume time

In commit 32443fc2ef4c ("x86-64, init: Do not set NX bits on non-NX
capable hardware") we added the early_pmd_flags that gets the NX bit set
when a CPU supports NX. However, the new variable was marked __initdata,
because the main _use_ of this is in an __init routine.

However, the bit setting happens from secondary_startup_64(), which is
called not only at bootup, but on every secondary CPU start.  Including
resuming from STR and at CPU hotplug time.  So the value cannot be
__initdata.

Reported-bisected-and-tested-by: Michal Hocko <mhocko@suse.cz>
Cc: stable@vger.kernel.org # v3.9
Acked-by: Peter Anvin <hpa@linux.intel.com>
Cc: Fernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/head64.c