aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/kmemcheck/kmemcheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/kmemcheck/kmemcheck.c')
-rw-r--r--arch/x86/mm/kmemcheck/kmemcheck.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/mm/kmemcheck/kmemcheck.c b/arch/x86/mm/kmemcheck/kmemcheck.c
index a644f248451b..6931e5115bcd 100644
--- a/arch/x86/mm/kmemcheck/kmemcheck.c
+++ b/arch/x86/mm/kmemcheck/kmemcheck.c
@@ -611,7 +611,6 @@ bool kmemcheck_fault(struct pt_regs *regs, unsigned long address,
611 unsigned long error_code) 611 unsigned long error_code)
612{ 612{
613 pte_t *pte; 613 pte_t *pte;
614 unsigned int level;
615 614
616 /* 615 /*
617 * XXX: Is it safe to assume that memory accesses from virtual 86 616 * XXX: Is it safe to assume that memory accesses from virtual 86
@@ -624,13 +623,9 @@ bool kmemcheck_fault(struct pt_regs *regs, unsigned long address,
624 if (regs->cs != __KERNEL_CS) 623 if (regs->cs != __KERNEL_CS)
625 return false; 624 return false;
626 625
627 pte = lookup_address(address, &level); 626 pte = kmemcheck_pte_lookup(address);
628 if (!pte) 627 if (!pte)
629 return false; 628 return false;
630 if (level != PG_LEVEL_4K)
631 return false;
632 if (!pte_hidden(*pte))
633 return false;
634 629
635 if (error_code & 2) 630 if (error_code & 2)
636 kmemcheck_access(regs, address, KMEMCHECK_WRITE); 631 kmemcheck_access(regs, address, KMEMCHECK_WRITE);