Skip to content

Commit

Permalink
signal/x86: Don't compute pkey in __do_page_fault
Browse files Browse the repository at this point in the history
There are no more users of the computed pkey value in __do_page_fault
so stop computing the value.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
  • Loading branch information
Eric W. Biederman committed Sep 21, 2018
1 parent 25c102d commit 988bbc7
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions arch/x86/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,6 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,
struct mm_struct *mm;
vm_fault_t fault, major = 0;
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
u32 pkey;

tsk = current;
mm = tsk->mm;
Expand Down Expand Up @@ -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
* userland). The return to userland is identified whenever
* 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);
major |= fault & VM_FAULT_MAJOR;

Expand Down

0 comments on commit 988bbc7

Please sign in to comment.