Hello, kernel test robot noticed "WARNING:bad_unlock_balance_detected" on: commit: a0e6a017ab56936c0405fe914a793b241ed25ee0 ("drm/vkms: Fix race-condition between the hrtimer and the atomic commit") https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master [test failed on linux-next/master d7b3af5a77e8d8da28f435f313e069aea5bcf172] in testcase: boot compiler: clang-16 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 | Closes: https://lore.kernel.org/oe-lkp/202307310941.def27019-oliver.sang@intel.com [ 7.022874][ C0] [ 7.022879][ C0] ===================================== [ 7.022880][ C0] WARNING: bad unlock balance detected! [ 7.022881][ C0] 6.5.0-rc2-00293-ga0e6a017ab56 #1 Not tainted [ 7.022884][ C0] ------------------------------------- [ 7.022884][ C0] swapper/0 is trying to release lock (&vkms_out->enabled_lock) at: [ 7.022889][ C0] [] vkms_vblank_simulate+0x81/0x170 [ 7.022897][ C0] but there are no more locks to release! [ 7.022899][ C0] [ 7.022899][ C0] other info that might help us debug this: [ 7.022899][ C0] no locks held by swapper/0. [ 7.022901][ C0] [ 7.022901][ C0] stack backtrace: [ 7.022902][ C0] CPU: 0 PID: 0 Comm: swapper Not tainted 6.5.0-rc2-00293-ga0e6a017ab56 #1 a575928c69424e0f0eaa98d531eaa43c00c3b508 [ 7.022906][ C0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 [ 7.022908][ C0] Call Trace: [ 7.022911][ C0] dump_stack_lvl+0x32/0x80 [ 7.023688][ C0] dump_stack+0xd/0x20 [ 7.023691][ C0] print_unlock_imbalance_bug+0x141/0x150 [ 7.023707][ C0] ? vkms_vblank_simulate+0x81/0x170 [ 7.023711][ C0] lock_release+0x197/0x2e0 [ 7.023714][ C0] ? vkms_vblank_simulate+0x81/0x170 [ 7.023717][ C0] __mutex_unlock_slowpath+0x2b/0x1f0 [ 7.023720][ C0] ? drm_handle_vblank+0x182/0x230 [ 7.023724][ C0] mutex_unlock+0x12/0x20 [ 7.023727][ C0] vkms_vblank_simulate+0x81/0x170 [ 7.023730][ C0] __hrtimer_run_queues+0x176/0x2c0 [ 7.023735][ C0] hrtimer_interrupt+0x116/0x320 [ 7.023738][ C0] __sysvec_apic_timer_interrupt+0x63/0x170 [ 7.023741][ C0] ? vmware_sched_clock+0xe0/0xe0 [ 7.023744][ C0] sysvec_apic_timer_interrupt+0x1a/0x40 [ 7.023748][ C0] handle_exception+0x14c/0x14c [ 7.023751][ C0] EIP: intel_idle_hlt+0x10/0x20 [ 7.023755][ C0] Code: 80 4f 02 20 f7 07 08 00 00 00 75 bb e9 73 ff ff ff 90 90 90 90 90 90 90 90 90 55 89 e5 89 c8 eb 07 0f 00 2d 74 52 96 ca fb f4 5d 31 c9 c3 90 90 90 90 90 90 90 90 90 90 90 55 89 e5 89 c8 fb [ 7.023757][ C0] EAX: 00000002 EBX: 00000002 ECX: 00000002 EDX: cb7136c4 [ 7.023759][ C0] ESI: c4f58704 EDI: cb713788 EBP: cb2e9eec ESP: cb2e9eec [ 7.023761][ C0] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00200246 [ 7.023765][ C0] ? __io_uring_show_fdinfo+0x3e0/0x5a0 [ 7.023767][ C0] ? vmware_sched_clock+0xe0/0xe0 [ 7.023770][ C0] ? __io_uring_show_fdinfo+0x3e0/0x5a0 [ 7.023772][ C0] ? vmware_sched_clock+0xe0/0xe0 [ 7.023775][ C0] ? intel_idle_hlt+0x10/0x20 [ 7.023779][ C0] cpuidle_enter_state+0xed/0x46d [ 7.023783][ C0] cpuidle_enter+0x27/0x40 [ 7.023787][ C0] do_idle+0x15c/0x210 [ 7.023790][ C0] cpu_startup_entry+0x15/0x20 [ 7.023792][ C0] rest_init+0x178/0x190 [ 7.023795][ C0] arch_call_rest_init+0xd/0x10 [ 7.023798][ C0] start_kernel+0x32b/0x3a0 [ 7.023801][ C0] i386_start_kernel+0x21d/0x230 [ 7.023804][ C0] startup_32_smp+0x151/0x160 To reproduce: # build kernel cd linux cp config-6.5.0-rc2-00293-ga0e6a017ab56 .config make HOSTCC=clang-16 CC=clang-16 ARCH=i386 olddefconfig prepare modules_prepare bzImage modules make HOSTCC=clang-16 CC=clang-16 ARCH=i386 INSTALL_MOD_PATH= modules_install cd find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz git clone https://github.com/intel/lkp-tests.git cd lkp-tests bin/lkp qemu -k -m modules.cgz job-script # job-script is attached in this email # if come across any failure that blocks the test, # please remove ~/.lkp and /lkp dir to run from a clean state. -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki