R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f7c83026038 R14: 00007f7c83025fa0 R15: 00007ffc63fae0f8 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.3.3380/19425 is trying to acquire lock: ffff88802747d898 (&iint_mutex_key[depth]){+.+.}-{3:3}, at: process_measurement+0x739/0x1d50 security/integrity/ima/ima_main.c:275 but task is already holding lock: ffffffff8ea17068 (dpm_list_mtx){+.+.}-{3:3}, at: device_pm_lock drivers/base/power/main.c:114 [inline] ffffffff8ea17068 (dpm_list_mtx){+.+.}-{3:3}, at: dpm_for_each_dev+0x29/0xb0 drivers/base/power/main.c:1997 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (dpm_list_mtx){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747 device_pm_add+0x7d/0x320 drivers/base/power/main.c:138 device_add+0x57d/0xc40 drivers/base/core.c:3716 cdev_device_add+0x1c6/0x380 fs/char_dev.c:556 hidg_bind+0x492/0x740 drivers/usb/gadget/function/f_hid.c:1015 usb_add_function+0x2dd/0x980 drivers/usb/gadget/composite.c:333 configfs_composite_bind+0xde4/0x13f0 drivers/usb/gadget/configfs.c:1800 gadget_bind_driver+0x2b3/0x770 drivers/usb/gadget/udc/core.c:1661 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x24a/0xae0 drivers/base/dd.c:717 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:879 driver_probe_device+0x4f/0x420 drivers/base/dd.c:909 __driver_attach+0x444/0x6d0 drivers/base/dd.c:1295 bus_for_each_dev+0x235/0x2b0 drivers/base/bus.c:370 bus_add_driver+0x340/0x630 drivers/base/bus.c:723 driver_register+0x23a/0x310 drivers/base/driver.c:246 usb_gadget_register_driver_owner+0xf9/0x270 drivers/usb/gadget/udc/core.c:1740 gadget_dev_desc_UDC_store+0x1c7/0x2e0 drivers/usb/gadget/configfs.c:300 flush_write_buffer fs/configfs/file.c:207 [inline] configfs_write_iter+0x312/0x400 fs/configfs/file.c:229 call_write_iter include/linux/fs.h:2019 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x474/0x9a0 fs/read_write.c:584 ksys_write+0x151/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #3 (&gi->lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747 gadget_dev_desc_UDC_show+0x26/0x80 drivers/usb/gadget/configfs.c:248 fill_read_buffer fs/configfs/file.c:68 [inline] configfs_read_iter+0x29d/0x570 fs/configfs/file.c:88 __kernel_read+0x2e5/0x730 fs/read_write.c:428 integrity_kernel_read+0x8a/0xd0 security/integrity/iint.c:221 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0xb1f/0x1960 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x4d4/0xa30 security/integrity/ima/ima_api.c:290 process_measurement+0x123a/0x1d50 security/integrity/ima/ima_main.c:370 ima_file_check+0xcc/0x110 security/integrity/ima/ima_main.c:568 do_open fs/namei.c:3697 [inline] path_openat+0x2910/0x3270 fs/namei.c:3856 do_filp_open+0x1f2/0x430 fs/namei.c:3883 do_sys_openat2+0x134/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x139/0x160 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #2 (&p->frag_sem){++++}-{3:3}: down_read+0x46/0x2e0 kernel/locking/rwsem.c:1520 fill_read_buffer fs/configfs/file.c:66 [inline] configfs_read_iter+0x1a5/0x570 fs/configfs/file.c:88 __kernel_read+0x2e5/0x730 fs/read_write.c:428 integrity_kernel_read+0x8a/0xd0 security/integrity/iint.c:221 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0xb1f/0x1960 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x4d4/0xa30 security/integrity/ima/ima_api.c:290 process_measurement+0x123a/0x1d50 security/integrity/ima/ima_main.c:370 ima_file_check+0xcc/0x110 security/integrity/ima/ima_main.c:568 do_open fs/namei.c:3697 [inline] path_openat+0x2910/0x3270 fs/namei.c:3856 do_filp_open+0x1f2/0x430 fs/namei.c:3883 do_sys_openat2+0x134/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x139/0x160 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #1 (&buffer->mutex){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747 configfs_read_iter+0x72/0x570 fs/configfs/file.c:86 __kernel_read+0x2e5/0x730 fs/read_write.c:428 integrity_kernel_read+0x8a/0xd0 security/integrity/iint.c:221 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0xb1f/0x1960 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x4d4/0xa30 security/integrity/ima/ima_api.c:290 process_measurement+0x123a/0x1d50 security/integrity/ima/ima_main.c:370 ima_file_check+0xcc/0x110 security/integrity/ima/ima_main.c:568 do_open fs/namei.c:3697 [inline] path_openat+0x2910/0x3270 fs/namei.c:3856 do_filp_open+0x1f2/0x430 fs/namei.c:3883 do_sys_openat2+0x134/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x139/0x160 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&iint_mutex_key[depth]){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747 process_measurement+0x739/0x1d50 security/integrity/ima/ima_main.c:275 ima_file_check+0xcc/0x110 security/integrity/ima/ima_main.c:568 do_open fs/namei.c:3697 [inline] path_openat+0x2910/0x3270 fs/namei.c:3856 do_file_open_root+0x2f3/0x5a0 fs/namei.c:3908 file_open_root+0x167/0x1c0 fs/open.c:1402 kernel_read_file_from_path_initns+0x151/0x230 fs/kernel_read_file.c:163 fw_get_filesystem_firmware drivers/base/firmware_loader/main.c:548 [inline] _request_firmware+0xb43/0x1520 drivers/base/firmware_loader/main.c:911 request_firmware drivers/base/firmware_loader/main.c:987 [inline] cache_firmware drivers/base/firmware_loader/main.c:1289 [inline] __async_dev_cache_fw_image+0x7f/0x240 drivers/base/firmware_loader/main.c:1403 async_schedule_node_domain+0xda/0x110 kernel/async.c:219 async_schedule_domain include/linux/async.h:72 [inline] dev_cache_fw_image+0x364/0x3e0 drivers/base/firmware_loader/main.c:1459 dpm_for_each_dev+0x4f/0xb0 drivers/base/power/main.c:1999 device_cache_fw_images drivers/base/firmware_loader/main.c:1511 [inline] fw_pm_notify+0x21c/0x2a0 drivers/base/firmware_loader/main.c:1561 notifier_call_chain+0x18f/0x380 kernel/notifier.c:93 notifier_call_chain_robust kernel/notifier.c:128 [inline] blocking_notifier_call_chain_robust+0x86/0x100 kernel/notifier.c:353 pm_notifier_call_chain_robust+0x2c/0x60 kernel/power/main.c:131 snapshot_open+0x139/0x280 kernel/power/user.c:87 misc_open+0x326/0x3a0 drivers/char/misc.c:163 chrdev_open+0x58c/0x600 fs/char_dev.c:414 do_dentry_open+0x880/0x14b0 fs/open.c:929 do_open fs/namei.c:3695 [inline] path_openat+0x284f/0x3270 fs/namei.c:3856 do_filp_open+0x1f2/0x430 fs/namei.c:3883 do_sys_openat2+0x134/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x139/0x160 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Chain exists of: &iint_mutex_key[depth] --> &gi->lock --> dpm_list_mtx Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(dpm_list_mtx); lock(&gi->lock); lock(dpm_list_mtx); lock(&iint_mutex_key[depth]); *** DEADLOCK *** 4 locks held by syz.3.3380/19425: #0: ffffffff8e8cfee8 (misc_mtx){+.+.}-{3:3}, at: misc_open+0x59/0x3a0 drivers/char/misc.c:125 #1: ffffffff8dfe5e48 (system_transition_mutex){+.+.}-{3:3}, at: lock_system_sleep+0x49/0x70 kernel/power/main.c:56 #2: ffffffff8e0063d0 ((pm_chain_head).rwsem){++++}-{3:3}, at: blocking_notifier_call_chain_robust+0x66/0x100 kernel/notifier.c:352 #3: ffffffff8ea17068 (dpm_list_mtx){+.+.}-{3:3}, at: device_pm_lock drivers/base/power/main.c:114 [inline] #3: ffffffff8ea17068 (dpm_list_mtx){+.+.}-{3:3}, at: dpm_for_each_dev+0x29/0xb0 drivers/base/power/main.c:1997 stack backtrace: CPU: 0 PID: 19425 Comm: syz.3.3380 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2215 check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747 process_measurement+0x739/0x1d50 security/integrity/ima/ima_main.c:275 ima_file_check+0xcc/0x110 security/integrity/ima/ima_main.c:568 do_open fs/namei.c:3697 [inline] path_openat+0x2910/0x3270 fs/namei.c:3856 do_file_open_root+0x2f3/0x5a0 fs/namei.c:3908 file_open_root+0x167/0x1c0 fs/open.c:1402 kernel_read_file_from_path_initns+0x151/0x230 fs/kernel_read_file.c:163 fw_get_filesystem_firmware drivers/base/firmware_loader/main.c:548 [inline] _request_firmware+0xb43/0x1520 drivers/base/firmware_loader/main.c:911 request_firmware drivers/base/firmware_loader/main.c:987 [inline] cache_firmware drivers/base/firmware_loader/main.c:1289 [inline] __async_dev_cache_fw_image+0x7f/0x240 drivers/base/firmware_loader/main.c:1403 async_schedule_node_domain+0xda/0x110 kernel/async.c:219 async_schedule_domain include/linux/async.h:72 [inline] dev_cache_fw_image+0x364/0x3e0 drivers/base/firmware_loader/main.c:1459 dpm_for_each_dev+0x4f/0xb0 drivers/base/power/main.c:1999 device_cache_fw_images drivers/base/firmware_loader/main.c:1511 [inline] fw_pm_notify+0x21c/0x2a0 drivers/base/firmware_loader/main.c:1561 notifier_call_chain+0x18f/0x380 kernel/notifier.c:93 notifier_call_chain_robust kernel/notifier.c:128 [inline] blocking_notifier_call_chain_robust+0x86/0x100 kernel/notifier.c:353 pm_notifier_call_chain_robust+0x2c/0x60 kernel/power/main.c:131 snapshot_open+0x139/0x280 kernel/power/user.c:87 misc_open+0x326/0x3a0 drivers/char/misc.c:163 chrdev_open+0x58c/0x600 fs/char_dev.c:414 do_dentry_open+0x880/0x14b0 fs/open.c:929 do_open fs/namei.c:3695 [inline] path_openat+0x284f/0x3270 fs/namei.c:3856 do_filp_open+0x1f2/0x430 fs/namei.c:3883 do_sys_openat2+0x134/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x139/0x160 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f7c82da8f19 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7c83d02028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f7c83025fa0 RCX: 00007f7c82da8f19 RDX: 0000000000121001 RSI: 0000200000000480 RDI: ffffffffffffff9c RBP: 00007f7c82e37f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f7c83026038 R14: 00007f7c83025fa0 R15: 00007ffc63fae0f8 (NULL device *): loading /lib/firmware/regulatory.db failed with error -12 (NULL device *): Direct firmware load for regulatory.db failed with error -12 (NULL device *): Falling back to sysfs fallback for: regulatory.db