mm/core, x86/mm/pkeys: Add execute-only protection keys support
[cascardo/linux.git] / arch / x86 / kernel / fpu / xstate.c
index 50813c3..1b19818 100644 (file)
@@ -877,8 +877,6 @@ int arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
        int pkey_shift = (pkey * PKRU_BITS_PER_PKEY);
        u32 new_pkru_bits = 0;
 
-       if (!validate_pkey(pkey))
-               return -EINVAL;
        /*
         * This check implies XSAVE support.  OSPKE only gets
         * set if we enable XSAVE and we enable PKU in XCR0.