Re: [PATCH] lockdep: Fix static memory detection even more

From: kernel test robot
Date: Mon Aug 14 2023 - 09:42:14 EST




Hello,

kernel test robot noticed "BUG:key#has_not_been_registered" on:

commit: 94d4413e506da48ea18f1cc982202874d35c76b1 ("[PATCH] lockdep: Fix static memory detection even more")
url: https://github.com/intel-lab-lkp/linux/commits/Helge-Deller/lockdep-Fix-static-memory-detection-even-more/20230812-235022
base: https://git.kernel.org/cgit/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/all/ZNep5EcYskP9HtGD@p100/
patch subject: [PATCH] lockdep: Fix static memory detection even more

in testcase: boot

compiler: gcc-12
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

(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/202308141646.d3160c77-oliver.sang@xxxxxxxxx



[ 0.575811][ T1] BUG: key b35c282c has not been registered!
[ 0.576580][ T1] ------------[ cut here ]------------
[ 0.577216][ T1] DEBUG_LOCKS_WARN_ON(1)
[ 0.577236][ T1] WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:4888 lockdep_init_map_type+0x155/0x250
[ 0.578389][ T1] Modules linked in:
[ 0.578856][ T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.5.0-rc4-00587-g94d4413e506d #2
[ 0.579899][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[ 0.581143][ T1] EIP: lockdep_init_map_type+0x155/0x250
[ 0.581677][ T1] Code: 70 a2 51 b4 85 db 75 ab e8 78 79 80 00 85 c0 74 a2 8b 0d 98 0a d4 b3 85 c9 75 98 68 59 2a 3b b3 68 8a ce 36 b3 e8 2b 7a f8 ff <0f> 0b 58
5a eb 83 8d 74 26 00 90 e8 4b 79 80 00 85 c0 0f 84 71 ff
[ 0.584028][ T1] EAX: 00000016 EBX: 00000000 ECX: 00000000 EDX: 00000000
[ 0.584881][ T1] ESI: b3384ac4 EDI: b35c282c EBP: b67fbe58 ESP: b67fbe44
[ 0.585009][ T1] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 EFLAGS: 00010286
[ 0.585927][ T1] CR0: 80050033 CR2: ff999000 CR3: 03f25000 CR4: 000406d0
[ 0.586773][ T1] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 0.587629][ T1] DR6: fffe0ff0 DR7: 00000400
[ 0.588198][ T1] Call Trace:
[ 0.588344][ T1] ? show_regs+0x74/0x80
[ 0.588860][ T1] ? lockdep_init_map_type+0x155/0x250
[ 0.589521][ T1] ? __warn+0x71/0x160
[ 0.590011][ T1] ? lockdep_init_map_type+0x155/0x250
[ 0.590684][ T1] ? report_bug+0x158/0x180
[ 0.591242][ T1] ? exc_overflow+0x40/0x40
[ 0.591677][ T1] ? handle_bug+0x2a/0x50
[ 0.592202][ T1] ? exc_invalid_op+0x25/0x70
[ 0.592749][ T1] ? handle_exception+0x14d/0x14d
[ 0.593337][ T1] ? exc_overflow+0x40/0x40
[ 0.593881][ T1] ? lockdep_init_map_type+0x155/0x250
[ 0.594502][ T1] ? exc_overflow+0x40/0x40
[ 0.595011][ T1] ? lockdep_init_map_type+0x155/0x250
[ 0.595653][ T1] __kernfs_create_file+0x6a/0xe0
[ 0.596244][ T1] sysfs_add_bin_file_mode_ns+0x4e/0xc0
[ 0.596891][ T1] sysfs_create_bin_file+0x5c/0x90
[ 0.597496][ T1] ? nsproxy_cache_init+0x30/0x30
[ 0.598090][ T1] ksysfs_init+0x5c/0x90
[ 0.598350][ T1] ? nsproxy_cache_init+0x30/0x30
[ 0.598935][ T1] do_one_initcall+0x5b/0x2f0
[ 0.599480][ T1] ? parse_args+0x1f3/0x350
[ 0.600028][ T1] do_initcalls+0xe4/0x1e0
[ 0.600558][ T1] kernel_init_freeable+0x171/0x2a0
[ 0.601187][ T1] ? rest_init+0x1b0/0x1b0
[ 0.601677][ T1] kernel_init+0x17/0x1b0
[ 0.602193][ T1] ret_from_fork+0x35/0x50
[ 0.602714][ T1] ? rest_init+0x1b0/0x1b0
[ 0.603235][ T1] ret_from_fork_asm+0x12/0x20
[ 0.603812][ T1] entry_INT80_32+0x10d/0x10d
[ 0.604359][ T1] irq event stamp: 7609
[ 0.604842][ T1] hardirqs last enabled at (7609): [<b1114e0e>] __up_console_sem+0x5e/0x80
[ 0.605011][ T1] hardirqs last disabled at (7608): [<b1114df5>] __up_console_sem+0x45/0x80
[ 0.606012][ T1] softirqs last enabled at (7260): [<b27a3d23>] __do_softirq+0x2a3/0x3a8
[ 0.607008][ T1] softirqs last disabled at (7229): [<b102f2e6>] do_softirq_own_stack+0x26/0x30
[ 0.608086][ T1] ---[ end trace 0000000000000000 ]---



The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20230814/202308141646.d3160c77-oliver.sang@xxxxxxxxx



--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki