summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/fault.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 5877b92ab6f1..6138db471b17 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -1101,24 +1101,6 @@ access_error(unsigned long error_code, struct vm_area_struct *vma)
/* This is only called for the current mm, so: */
bool foreign = false;
/*
- * Access or read was blocked by protection keys. We do
- * this check before any others because we do not want
- * to, for instance, confuse a protection-key-denied
- * write with one for which we should do a COW.
- */
- if (error_code & PF_PK)
- return 1;
-
- if (!(error_code & PF_INSTR)) {
- /*
- * Assume all accesses require either read or execute
- * permissions. This is not an instruction access, so
- * it requires read permissions.
- */
- if (!(vma->vm_flags & VM_READ))
- return 1;
- }
- /*
* Make sure to check the VMA so that we do not perform
* faults just to hit a PF_PK as soon as we fill in a
* page.