Commit 988bbc7b authored by Eric W. Biederman's avatar Eric W. Biederman

signal/x86: Don't compute pkey in __do_page_fault

There are no more users of the computed pkey value in __do_page_fault
so stop computing the value.
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 25c102d8
...@@ -1216,7 +1216,6 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code, ...@@ -1216,7 +1216,6 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,
struct mm_struct *mm; struct mm_struct *mm;
vm_fault_t fault, major = 0; vm_fault_t fault, major = 0;
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
u32 pkey;
tsk = current; tsk = current;
mm = tsk->mm; mm = tsk->mm;
...@@ -1388,10 +1387,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code, ...@@ -1388,10 +1387,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,
* (potentially after handling any pending signal during the return to * (potentially after handling any pending signal during the return to
* userland). The return to userland is identified whenever * userland). The return to userland is identified whenever
* FAULT_FLAG_USER|FAULT_FLAG_KILLABLE are both set in flags. * FAULT_FLAG_USER|FAULT_FLAG_KILLABLE are both set in flags.
* Thus we have to be careful about not touching vma after handling the
* fault, so we read the pkey beforehand.
*/ */
pkey = vma_pkey(vma);
fault = handle_mm_fault(vma, address, flags); fault = handle_mm_fault(vma, address, flags);
major |= fault & VM_FAULT_MAJOR; major |= fault & VM_FAULT_MAJOR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment