diff options
author | Wang Kefeng <wangkefeng.wang@huawei.com> | 2022-10-11 04:34:05 +0300 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-11-07 17:19:00 +0300 |
commit | b40b84b120f5cb5f8c6de0b404ffb68cf72b7c90 (patch) | |
tree | ab6b54a0cd0c32231470f8ded531b6adb2cf357b | |
parent | d539fee9f825b0c8eac049732c83562b28a483b5 (diff) | |
download | linux-b40b84b120f5cb5f8c6de0b404ffb68cf72b7c90.tar.xz |
ARM: 9254/1: mm: Provide better message when kernel fault
If there is a kernel fault, see do_kernel_fault(), we only print
the generic "paging request" or "NULL pointer dereference" message
which don't show read, write or excute information, let's provide
better fault message for them.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | arch/arm/mm/fault.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 46cccd6bf705..f8fe0ec64c23 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -111,8 +111,9 @@ static void die_kernel_fault(const char *msg, struct mm_struct *mm, { bust_spinlocks(1); pr_alert("8<--- cut here ---\n"); - pr_alert("Unable to handle kernel %s at virtual address %08lx\n", - msg, addr); + pr_alert("Unable to handle kernel %s at virtual address %08lx when %s\n", + msg, addr, fsr & FSR_LNX_PF ? "execute" : + fsr & FSR_WRITE ? "write" : "read"); show_pte(KERN_ALERT, mm, addr); die("Oops", regs, fsr); |