From: Sven Schnelle Date: Thu, 30 Sep 2021 17:26:03 +0000 (+0200) Subject: parisc/unwind: use copy_from_kernel_nofault() X-Git-Tag: v6.1-rc5~2791^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf2ec7893f876f4c30aed8a76bb4ebacdce74dd3;p=platform%2Fkernel%2Flinux-starfive.git parisc/unwind: use copy_from_kernel_nofault() I have no idea why get_user() is used there, but we're unwinding the kernel stack, so we should use copy_from_kernel_nofault(). Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller --- diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c index 87ae476..889d588 100644 --- a/arch/parisc/kernel/unwind.c +++ b/arch/parisc/kernel/unwind.c @@ -302,7 +302,8 @@ static void unwind_frame_regs(struct unwind_frame_info *info) break; } - if (get_user(tmp, (unsigned long *)(info->prev_sp - RP_OFFSET))) + if (copy_from_kernel_nofault(&tmp, + (void *)info->prev_sp - RP_OFFSET, sizeof(tmp))) break; info->prev_ip = tmp; sp = info->prev_sp;