vivid-000: ================= START STATUS ================= vivid-000: Brightness: ====================================================== WARNING: possible circular locking dependency detected 6.9.0-syzkaller-02713-g1b10b390d945 #0 Not tainted ------------------------------------------------------ syz-executor.2/6800 is trying to acquire lock: ffff888025520818 (vivid_ctrls:1608:(hdl_user_vid)->_lock){+.+.}-{3:3}, at: v4l2_ctrl_lock include/media/v4l2-ctrls.h:572 [inline] ffff888025520818 (vivid_ctrls:1608:(hdl_user_vid)->_lock){+.+.}-{3:3}, at: log_ctrl drivers/media/v4l2-core/v4l2-ctrls-core.c:2519 [inline] ffff888025520818 (vivid_ctrls:1608:(hdl_user_vid)->_lock){+.+.}-{3:3}, at: v4l2_ctrl_handler_log_status+0x2f3/0x540 drivers/media/v4l2-core/v4l2-ctrls-core.c:2557 but task is already holding lock: ffff8880255215b0 (vivid_ctrls:1620:(hdl_vid_cap)->_lock){+.+.}-{3:3}, at: v4l2_ctrl_handler_log_status+0x11f/0x540 drivers/media/v4l2-core/v4l2-ctrls-core.c:2552 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (vivid_ctrls:1620:(hdl_vid_cap)->_lock){+.+.}-{3:3}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 find_ref_lock+0x5b/0x470 drivers/media/v4l2-core/v4l2-ctrls-core.c:1648 handler_new_ref+0x102/0x940 drivers/media/v4l2-core/v4l2-ctrls-core.c:1685 v4l2_ctrl_add_handler+0x1a1/0x290 drivers/media/v4l2-core/v4l2-ctrls-core.c:2209 vivid_create_controls+0x2585/0x3580 drivers/media/test-drivers/vivid/vivid-ctrls.c:1931 vivid_create_instance drivers/media/test-drivers/vivid/vivid-core.c:1854 [inline] vivid_probe+0x4289/0x6fa0 drivers/media/test-drivers/vivid/vivid-core.c:2018 platform_probe+0x13a/0x1c0 drivers/base/platform.c:1404 really_probe+0x2b8/0xad0 drivers/base/dd.c:656 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:798 driver_probe_device+0x50/0x430 drivers/base/dd.c:828 __driver_attach+0x45f/0x710 drivers/base/dd.c:1214 bus_for_each_dev+0x239/0x2b0 drivers/base/bus.c:368 bus_add_driver+0x347/0x620 drivers/base/bus.c:673 driver_register+0x23a/0x320 drivers/base/driver.c:246 vivid_init+0x3d/0x70 drivers/media/test-drivers/vivid/vivid-core.c:2145 do_one_initcall+0x248/0x880 init/main.c:1245 do_initcall_level+0x157/0x210 init/main.c:1307 do_initcalls+0x3f/0x80 init/main.c:1323 kernel_init_freeable+0x435/0x5d0 init/main.c:1556 kernel_init+0x1d/0x2b0 init/main.c:1445 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 -> #0 (vivid_ctrls:1608:(hdl_user_vid)->_lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18cb/0x58e0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 v4l2_ctrl_lock include/media/v4l2-ctrls.h:572 [inline] log_ctrl drivers/media/v4l2-core/v4l2-ctrls-core.c:2519 [inline] v4l2_ctrl_handler_log_status+0x2f3/0x540 drivers/media/v4l2-core/v4l2-ctrls-core.c:2557 v4l2_ctrl_log_status+0xe3/0x100 drivers/media/v4l2-core/v4l2-ctrls-api.c:1206 vidioc_log_status+0x63/0x110 drivers/media/test-drivers/vivid/vivid-core.c:426 v4l_log_status+0x8f/0x110 drivers/media/v4l2-core/v4l2-ioctl.c:2562 __video_do_ioctl+0xc26/0xde0 drivers/media/v4l2-core/v4l2-ioctl.c:3049 video_usercopy+0x899/0x1180 drivers/media/v4l2-core/v4l2-ioctl.c:3390 v4l2_ioctl+0x18c/0x1e0 drivers/media/v4l2-core/v4l2-dev.c:364 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:904 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:890 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(vivid_ctrls:1620:(hdl_vid_cap)->_lock); lock(vivid_ctrls:1608:(hdl_user_vid)->_lock); lock(vivid_ctrls:1620:(hdl_vid_cap)->_lock); lock(vivid_ctrls:1608:(hdl_user_vid)->_lock); *** DEADLOCK *** 2 locks held by syz-executor.2/6800: #0: ffff888025525aa8 (&dev->mutex#3){+.+.}-{3:3}, at: __video_do_ioctl+0x4ed/0xde0 drivers/media/v4l2-core/v4l2-ioctl.c:3017 #1: ffff8880255215b0 (vivid_ctrls:1620:(hdl_vid_cap)->_lock){+.+.}-{3:3}, at: v4l2_ctrl_handler_log_status+0x11f/0x540 drivers/media/v4l2-core/v4l2-ctrls-core.c:2552 stack backtrace: CPU: 1 PID: 6800 Comm: syz-executor.2 Not tainted 6.9.0-syzkaller-02713-g1b10b390d945 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18cb/0x58e0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 v4l2_ctrl_lock include/media/v4l2-ctrls.h:572 [inline] log_ctrl drivers/media/v4l2-core/v4l2-ctrls-core.c:2519 [inline] v4l2_ctrl_handler_log_status+0x2f3/0x540 drivers/media/v4l2-core/v4l2-ctrls-core.c:2557 v4l2_ctrl_log_status+0xe3/0x100 drivers/media/v4l2-core/v4l2-ctrls-api.c:1206 vidioc_log_status+0x63/0x110 drivers/media/test-drivers/vivid/vivid-core.c:426 v4l_log_status+0x8f/0x110 drivers/media/v4l2-core/v4l2-ioctl.c:2562 __video_do_ioctl+0xc26/0xde0 drivers/media/v4l2-core/v4l2-ioctl.c:3049 video_usercopy+0x899/0x1180 drivers/media/v4l2-core/v4l2-ioctl.c:3390 v4l2_ioctl+0x18c/0x1e0 drivers/media/v4l2-core/v4l2-dev.c:364 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:904 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:890 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1109e7dd69 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f110ab5f0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f1109fabf80 RCX: 00007f1109e7dd69 RDX: 0000000000000000 RSI: 0000000000005646 RDI: 0000000000000003 RBP: 00007f1109eca49e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f1109fabf80 R15: 00007f110a0cfa98 128 vivid-000: Contrast: 128 vivid-000: Saturation: 128 vivid-000: Hue: 0 vivid-000: Volume: 200 vivid-000: Mute: false vivid-000: Gain, Automatic: true vivid-000: Gain: 100 inactive volatile vivid-000: Horizontal Flip: false vivid-000: Vertical Flip: false vivid-000: Alpha Component: 0 vivid-000: Boolean: true vivid-000: Integer 32 Bits: 0 vivid-000: Integer 64 Bits: 0 vivid-000: Menu: Menu Item 3 vivid-000: String: vivid-000: Bitmask: 0x80002000 vivid-000: Integer Menu: 5 vivid-000: U32 1 Element Array: [1] 24 vivid-000: U16 8x16 Matrix: [8][16] 24 vivid-000: U8 2x3x4x5 Array: [2][3][4][5] 24 vivid-000: Area: unknown type 262 vivid-000: Read-Only Integer 32 Bits: 0 vivid-000: U32 Dynamic Array: [100] 50 vivid-000: U8 Pixel Array: [320][192] 128 vivid-000: S32 2 Element Array: [2] 2 vivid-000: S64 5 Element Array: [5] 4 vivid-000: Power Present: 0x00000001 vivid-000: Rx RGB Quantization Range: Automatic vivid-000: Test Pattern: 75% Colorbar vivid-000: OSD Text Mode: All vivid-000: Horizontal Movement: No Movement vivid-000: Vertical Movement: No Movement vivid-000: Show Border: false vivid-000: Show Square: false vivid-000: Insert SAV Code in Image: false vivid-000: Insert EAV Code in Image: false vivid-000: Insert Video Guard Band: false vivid-000: Sensor Flipped Horizontally: false vivid-000: Sensor Flipped Vertically: false vivid-000: Standard Aspect Ratio: 4x3 vivid-000: DV Timings Aspect Ratio: Source Width x Height vivid-000: Timestamp Source: End of Frame vivid-000: Colorspace: sRGB vivid-000: Transfer Function: Default vivid-000: Y'CbCr Encoding: Default vivid-000: Quantization: Default vivid-000: Limited RGB Range (16-235): false vivid-000: Apply Alpha To Red Only: false vivid-000: Enable Capture Cropping: true vivid-000: Enable Capture Composing: true vivid-000: Enable Capture Scaler: true vivid-000: Loop Video: false vivid-000: Wrap Sequence Number: false vivid-000: Wrap Timestamp: None vivid-000: Maximum EDID Blocks: 2 vivid-000: Fill Percentage of Frame: 100 vivid-000: Reduced Framerate: false vivid-000: HSV Encoding: Hue 0-179 vivid-000: Standard Signal Mode: Current Standard vivid-000: Standard: NTSC-M vivid-000: DV Timings Signal Mode: Current DV Timings inactive vivid-000: DV Timings: 640x480p59 inactive vivid-000: Percentage of Dropped Buffers: 0 tpg source WxH: 320x180 (HSV) tpg field: 1 tpg crop: 320x180@0x0 tpg compose: 320x180@0x0 tpg colorspace: 8 tpg transfer function: 0/0 tpg HSV encoding: 0/0 tpg quantization: 0/0 tpg RGB range: 0/2 vivid-000: ================== END STATUS ==================