aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/mm/dump_pagetables.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index 62a7e9f65dec..cc7ff5957194 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -18,6 +18,7 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/sched.h> 19#include <linux/sched.h>
20#include <linux/seq_file.h> 20#include <linux/seq_file.h>
21#include <linux/highmem.h>
21 22
22#include <asm/pgtable.h> 23#include <asm/pgtable.h>
23 24
@@ -334,16 +335,16 @@ static void walk_pte_level(struct seq_file *m, struct pg_state *st, pmd_t addr,
334 pgprotval_t eff_in, unsigned long P) 335 pgprotval_t eff_in, unsigned long P)
335{ 336{
336 int i; 337 int i;
337 pte_t *start; 338 pte_t *pte;
338 pgprotval_t prot, eff; 339 pgprotval_t prot, eff;
339 340
340 start = (pte_t *)pmd_page_vaddr(addr);
341 for (i = 0; i < PTRS_PER_PTE; i++) { 341 for (i = 0; i < PTRS_PER_PTE; i++) {
342 prot = pte_flags(*start);
343 eff = effective_prot(eff_in, prot);
344 st->current_address = normalize_addr(P + i * PTE_LEVEL_MULT); 342 st->current_address = normalize_addr(P + i * PTE_LEVEL_MULT);
343 pte = pte_offset_map(&addr, st->current_address);
344 prot = pte_flags(*pte);
345 eff = effective_prot(eff_in, prot);
345 note_page(m, st, __pgprot(prot), eff, 5); 346 note_page(m, st, __pgprot(prot), eff, 5);
346 start++; 347 pte_unmap(pte);
347 } 348 }
348} 349}
349#ifdef CONFIG_KASAN 350#ifdef CONFIG_KASAN