diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-02-26 11:53:11 +0200 |
---|---|---|
committer | Vegard Nossum <vegard.nossum@gmail.com> | 2009-06-15 12:40:00 +0200 |
commit | f8b4ece2a94693b7d2dd32ea716cb92545b5dce6 (patch) | |
tree | 9ab0400f03b975ea2d447a0694779c0d3342028e /arch/x86/mm/kmemcheck | |
parent | 6d9609c13250631c1d0c55a29a64d5687fd91293 (diff) |
kmemcheck: use kmemcheck_pte_lookup() instead of open-coding it
Lets use kmemcheck_pte_lookup() in kmemcheck_fault() instead of
open-coding it there.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Diffstat (limited to 'arch/x86/mm/kmemcheck')
-rw-r--r-- | arch/x86/mm/kmemcheck/kmemcheck.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/mm/kmemcheck/kmemcheck.c b/arch/x86/mm/kmemcheck/kmemcheck.c index a644f248451..6931e5115bc 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, unsigned long error_code) { pte_t *pte; - unsigned int level; /* * 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, if (regs->cs != __KERNEL_CS) return false; - pte = lookup_address(address, &level); + pte = kmemcheck_pte_lookup(address); if (!pte) return false; - if (level != PG_LEVEL_4K) - return false; - if (!pte_hidden(*pte)) - return false; if (error_code & 2) kmemcheck_access(regs, address, KMEMCHECK_WRITE); |