Hello, kernel test robot noticed "WARNING:at_drivers/gpu/drm/drm_framebuffer.c:#drm_framebuffer_free[drm]" on: commit: d2194256049910d286cd6c308c2689df521d8842 ("drm/tests: Add test for drm_framebuffer_free()") https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master [test failed on linux-next/master 15e7d45e786a62a211dd0098fee7c57f84f8c681] in testcase: kunit version: with following parameters: group: group-00 config: x86_64-rhel-8.3-kunit compiler: gcc-12 test machine: 4 threads 1 sockets Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz (Ivy Bridge) with 8G 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/202410171515.c79582d2-oliver.sang@xxxxxxxxx kern :warn : [ 111.096210] ------------[ cut here ]------------ kern :warn : [ 111.096421] drm-kunit-mock-device drm_test_framebuffer_free.drm-kunit-mock-device: [drm] drm_WARN_ON(!list_empty(&fb->filp_head)) kern :warn : [ 111.096523] WARNING: CPU: 1 PID: 4862 at drivers/gpu/drm/drm_framebuffer.c:832 drm_framebuffer_free (drivers/gpu/drm/drm_framebuffer.c:832) drm kern :warn : [ 111.097075] Modules linked in: drm_framebuffer_test drm_kunit_helpers linear_ranges btrfs intel_rapl_msr intel_rapl_common x86_pkg_temp_thermal intel_powerclamp coretemp blake2b_generic xor kvm_intel raid6_pq libcrc32c kvm crct10dif_pclmul crc32_generic crc32_pclmul crc32c_intel ghash_clmulni_intel sd_mod sg sha512_ssse3 rapl i915 intel_cstate ipmi_devintf ipmi_msghandler ahci libahci intel_uncore ttm intel_gtt libata mei_me drm_display_helper drm_kms_helper mei drm_buddy video wmi drm fuse ip_tables [last unloaded: drm_format_test] kern :warn : [ 111.098045] CPU: 1 UID: 0 PID: 4862 Comm: kunit_try_catch Tainted: G S B N 6.11.0-rc7-01411-gd21942560499 #1 kern :warn : [ 111.098262] Tainted: [S]=CPU_OUT_OF_SPEC, [B]=BAD_PAGE, [N]=TEST kern :warn : [ 111.098389] Hardware name: Hewlett-Packard p6-1451cx/2ADA, BIOS 8.15 02/05/2013 kern :warn : [ 111.098555] RIP: 0010:drm_framebuffer_free (drivers/gpu/drm/drm_framebuffer.c:832) drm kern :warn : [ 111.098795] Code: 8b 74 24 50 4d 85 f6 74 28 4c 89 e7 e8 af a2 96 c2 48 c7 c1 e0 d8 3e c0 4c 89 f2 48 c7 c7 40 d9 3e c0 48 89 c6 e8 66 ca eb c0 <0f> 0b e9 2e ff ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 All code ======== 0: 8b 74 24 50 mov 0x50(%rsp),%esi 4: 4d 85 f6 test %r14,%r14 7: 74 28 je 0x31 9: 4c 89 e7 mov %r12,%rdi c: e8 af a2 96 c2 call 0xffffffffc296a2c0 11: 48 c7 c1 e0 d8 3e c0 mov $0xffffffffc03ed8e0,%rcx 18: 4c 89 f2 mov %r14,%rdx 1b: 48 c7 c7 40 d9 3e c0 mov $0xffffffffc03ed940,%rdi 22: 48 89 c6 mov %rax,%rsi 25: e8 66 ca eb c0 call 0xffffffffc0ebca90 2a:* 0f 0b ud2 <-- trapping instruction 2c: e9 2e ff ff ff jmp 0xffffffffffffff5f 31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 38: fc ff df 3b: 4c 89 e2 mov %r12,%rdx 3e: 48 rex.W 3f: c1 .byte 0xc1 Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: e9 2e ff ff ff jmp 0xffffffffffffff35 7: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax e: fc ff df 11: 4c 89 e2 mov %r12,%rdx 14: 48 rex.W 15: c1 .byte 0xc1 kern :warn : [ 111.099136] RSP: 0018:ffffc90000b8fc08 EFLAGS: 00010286 kern :warn : [ 111.099253] RAX: 0000000000000000 RBX: ffffc90000b8fcc8 RCX: 0000000000000027 kern :warn : [ 111.099400] RDX: 0000000000000027 RSI: 0000000000000004 RDI: ffff8881c0eb0b08 kern :warn : [ 111.099560] RBP: ffffc90000b8fca0 R08: 0000000000000001 R09: ffffed10381d6161 kern :warn : [ 111.099707] R10: ffff8881c0eb0b0b R11: 0000000000000001 R12: ffff888122f04000 kern :warn : [ 111.099852] R13: ffff88821e36b000 R14: ffff888130ed8e80 R15: ffffc90000a1f920 kern :warn : [ 111.099996] FS: 0000000000000000(0000) GS:ffff8881c0e80000(0000) knlGS:0000000000000000 kern :warn : [ 111.100158] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kern :warn : [ 111.100280] CR2: 00000000f7203009 CR3: 00000001047ee005 CR4: 00000000001706f0 kern :warn : [ 111.100426] DR0: ffffffff874243e0 DR1: ffffffff874243e1 DR2: ffffffff874243e3 kern :warn : [ 111.100581] DR3: ffffffff874243e5 DR6: 00000000ffff0ff0 DR7: 0000000000000600 kern :warn : [ 111.100726] Call Trace: kern :warn : [ 111.100793] <TASK> kern :warn : [ 111.100853] ? __warn (kernel/panic.c:741) kern :warn : [ 111.100940] ? drm_framebuffer_free (drivers/gpu/drm/drm_framebuffer.c:832) drm kern :warn : [ 111.101164] ? report_bug (lib/bug.c:180 lib/bug.c:219) kern :warn : [ 111.101257] ? handle_bug (arch/x86/kernel/traps.c:239) kern :warn : [ 111.101346] ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1)) kern :warn : [ 111.101439] ? asm_exc_invalid_op (arch/x86/include/asm/idtentry.h:621) kern :warn : [ 111.101554] ? drm_framebuffer_free (drivers/gpu/drm/drm_framebuffer.c:832) drm kern :warn : [ 111.101773] ? drm_framebuffer_free (drivers/gpu/drm/drm_framebuffer.c:832) drm kern :warn : [ 111.101991] drm_test_framebuffer_free (drivers/gpu/drm/tests/drm_framebuffer_test.c:693 (discriminator 5)) drm_framebuffer_test kern :warn : [ 111.102139] ? __pfx_drm_test_framebuffer_free (drivers/gpu/drm/tests/drm_framebuffer_test.c:670) drm_framebuffer_test kern :warn : [ 111.102295] ? __pfx_drm_mode_config_init_release (drivers/gpu/drm/drm_mode_config.c:386) drm kern :warn : [ 111.102539] ? __drmm_add_action (drivers/gpu/drm/drm_managed.c:161) drm kern :warn : [ 111.102756] ? __schedule (kernel/sched/core.c:6399) kern :warn : [ 111.102848] ? __pfx_read_tsc (arch/x86/kernel/tsc.c:1130) kern :warn : [ 111.102941] ? ktime_get_ts64 (kernel/time/timekeeping.c:378 (discriminator 4) kernel/time/timekeeping.c:395 (discriminator 4) kernel/time/timekeeping.c:403 (discriminator 4) kernel/time/timekeeping.c:983 (discriminator 4)) kern :warn : [ 111.103037] kunit_try_run_case (lib/kunit/test.c:400 lib/kunit/test.c:443) kern :warn : [ 111.103135] ? __pfx_kunit_try_run_case (lib/kunit/test.c:430) kern :warn : [ 111.103243] ? set_cpus_allowed_ptr (kernel/sched/core.c:3025) kern :warn : [ 111.103345] ? __pfx_set_cpus_allowed_ptr (kernel/sched/core.c:3025) kern :warn : [ 111.103455] ? __pfx_kunit_try_run_case (lib/kunit/test.c:430) kern :warn : [ 111.103574] ? __pfx_kunit_generic_run_threadfn_adapter (lib/kunit/try-catch.c:26) kern :warn : [ 111.103705] kunit_generic_run_threadfn_adapter (lib/kunit/try-catch.c:31) kern :warn : [ 111.103823] kthread (kernel/kthread.c:389) kern :warn : [ 111.103907] ? __pfx_kthread (kernel/kthread.c:342) kern :warn : [ 111.103997] ret_from_fork (arch/x86/kernel/process.c:153) kern :warn : [ 111.104085] ? __pfx_kthread (kernel/kthread.c:342) kern :warn : [ 111.104175] ret_from_fork_asm (arch/x86/entry/entry_64.S:257) kern :warn : [ 111.104272] </TASK> kern :warn : [ 111.104334] ---[ end trace 0000000000000000 ]--- kern :info : [ 111.116715] ok 4 drm_test_framebuffer_free kern :info : [ 111.124711] ok 5 drm_test_framebuffer_init The kernel config and materials to reproduce are available at: https://download.01.org/0day-ci/archive/20241017/202410171515.c79582d2-oliver.sang@xxxxxxxxx -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki