diff options
-rw-r--r-- | arch/x86/mm/pat/set_memory.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c index 1a2d6376251c..20b1e24baa85 100644 --- a/arch/x86/mm/pat/set_memory.c +++ b/arch/x86/mm/pat/set_memory.c @@ -587,7 +587,8 @@ static inline pgprot_t verify_rwx(pgprot_t old, pgprot_t new, unsigned long star { unsigned long end; - if (!cpu_feature_enabled(X86_FEATURE_NX)) + /* Only enforce when NX is supported: */ + if (!(__supported_pte_mask & _PAGE_NX)) return new; if (!((pgprot_val(old) ^ pgprot_val(new)) & (_PAGE_RW | _PAGE_NX))) |