From d44d611fc40ee7141b5e686941346d72b338936c Mon Sep 17 00:00:00 2001 From: Jianxin Pan Date: Fri, 19 Oct 2018 16:20:55 +0800 Subject: [PATCH] debug: show ioremap vmalloc pfn debug when user faults happens [1/1] PD#173163 Problem: ioremap/vmalloc pfn is not printed when user fault Solution: show ioremap/vmalloc pfn debug when user faults happens Verify: verify local Change-Id: I654fac58db7d8b35144b4c639e32c324b95ed032 Signed-off-by: Jianxin Pan --- arch/arm/mm/fault.c | 2 +- arch/arm64/mm/fault.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 17616d7..19c749a 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -131,7 +131,7 @@ static long get_user_pfn(struct mm_struct *mm, unsigned long addr) long pfn = -1; pgd_t *pgd; - if (!mm) + if (!mm || addr >= VMALLOC_START) mm = &init_mm; pgd = pgd_offset(mm, addr); diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index d97e502..2a976fc 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -174,7 +174,7 @@ static long get_user_pfn(struct mm_struct *mm, unsigned long addr) long pfn = -1; pgd_t *pgd; - if (!mm) + if (!mm || addr >= VMALLOC_START) mm = &init_mm; pgd = pgd_offset(mm, addr); -- 2.7.4