Re: [PATCH v2 05/11] perf/x86: Use user_unwind interface

From: Namhyung Kim
Date: Tue Sep 17 2024 - 18:02:19 EST


Hello,

On Mon, Sep 16, 2024 at 02:48:35PM +0800, kernel test robot wrote:
>
>
> Hello,
>
> kernel test robot noticed "kernel_BUG_at_kernel/unwind/user.c" on:
>
> commit: 164c5ae4072303c9eb4e263115a5e70d5a3cc052 ("[PATCH v2 05/11] perf/x86: Use user_unwind interface")
> url: https://github.com/intel-lab-lkp/linux/commits/Josh-Poimboeuf/unwind-Introduce-generic-user-space-unwinding-interface/20240914-070619
> base: https://git.kernel.org/cgit/linux/kernel/git/perf/perf-tools-next.git perf-tools-next
> patch link: https://lore.kernel.org/all/daf3f59e0d14ee11b45ad6735b8a211a3c7534dc.1726268190.git.jpoimboe@xxxxxxxxxx/
> patch subject: [PATCH v2 05/11] perf/x86: Use user_unwind interface
>
> in testcase: fsmark
> version: fsmark-x86_64-2628be5-1_20240224
> with following parameters:
>
> iterations: 1x
> nr_threads: 64t
> disk: 1BRD_48G
> fs: xfs
> filesize: 4M
> test_size: 24G
> sync_method: NoSync
> cpufreq_governor: performance
>
>
>
> compiler: gcc-12
> test machine: 96 threads 2 sockets Intel(R) Xeon(R) Platinum 8260L CPU @ 2.40GHz (Cascade Lake) with 128G memory
>
> (please refer to attached dmesg/kmsg for entire log/backtrace)
>
>
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-lkp/202409161428.3cc6c1e1-oliver.sang@xxxxxxxxx
>
>
> [ 53.036370][ C3] ------------[ cut here ]------------
> [ 53.036374][ C3] kernel BUG at kernel/unwind/user.c:39!

I also noticed this and the following patch would fix it.

Thanks,
Namhyung


diff --git a/kernel/unwind/user.c b/kernel/unwind/user.c
index 3a7b14cf522b4139..3c8f1deb6d34ec37 100644
--- a/kernel/unwind/user.c
+++ b/kernel/unwind/user.c
@@ -80,8 +80,10 @@ int user_unwind_start(struct user_unwind_state *state,
case USER_UNWIND_TYPE_SFRAME:
if (!sframe_possible)
return -EINVAL;
+ state->type = type;
break;
case USER_UNWIND_TYPE_FP:
+ state->type = type;
break;
default:
return -EINVAL;