• Linus Torvalds's avatar
    x86: setup_smep needs to be __cpuinit · 82da65da
    Linus Torvalds authored
    The setup_smep function gets calle at resume time too, and is thus not a
    pure __init function.  When marked as __init, it gets thrown out after
    the kernel has initialized, and when the kernel is suspended and
    resumed, the code will no longer be around, and we'll get a nice "kernel
    tried to execute NX-protected page" oops because the page is no longer
    marked executable.
    Reported-and-tested-by: default avatarParag Warudkar <parag.lkml@gmail.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: "H. Peter Anvin" <hpa@linux.intel.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    82da65da
common.c 30.3 KB