====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.7.2569/18983 is trying to acquire lock: ffff88803f879858 (&pipe->mutex){+.+.}-{4:4}, at: iter_file_splice_write+0x20d/0x1240 fs/splice.c:682 but task is already holding lock: ffff88801aeb2510 (sb_writers#5){.+.+}-{0:0}, at: do_splice+0xe99/0x1990 fs/splice.c:1348 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #6 (sb_writers#5){.+.+}-{0:0}: percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline] __sb_start_write include/linux/fs/super.h:19 [inline] sb_start_write+0x4d/0x1d0 include/linux/fs/super.h:125 mnt_want_write+0x41/0x90 fs/namespace.c:494 lookup_open+0x1ec/0x1a60 fs/namei.c:4451 open_last_lookups fs/namei.c:4767 [inline] path_openat+0x67c/0x1d60 fs/namei.c:4997 do_file_open+0x23e/0x4a0 fs/namei.c:5029 file_open_name fs/open.c:1375 [inline] filp_open+0x16d/0x1d0 fs/open.c:1392 fsg_lun_open+0x6c/0xe00 drivers/usb/gadget/function/storage_common.c:194 fsg_store_file+0x19e/0x400 drivers/usb/gadget/function/storage_common.c:455 flush_write_buffer fs/configfs/file.c:207 [inline] configfs_write_iter+0x33a/0x430 fs/configfs/file.c:229 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x61e/0xbb0 fs/read_write.c:687 ksys_write+0x156/0x270 fs/read_write.c:739 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #5 (&common->filesem){++++}-{4:4}: down_read+0x97/0x200 kernel/locking/rwsem.c:1574 fsg_show_file+0x2d/0x140 drivers/usb/gadget/function/storage_common.c:339 fill_read_buffer fs/configfs/file.c:68 [inline] configfs_read_iter+0x2ba/0x620 fs/configfs/file.c:88 __kernel_read+0x4d3/0x970 fs/read_write.c:532 integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:222 [inline] ima_calc_file_hash+0x45d/0x8a0 security/integrity/ima/ima_crypto.c:280 ima_collect_measurement+0x521/0xa10 security/integrity/ima/ima_api.c:300 process_measurement+0x1282/0x1c20 security/integrity/ima/ima_main.c:425 ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:685 security_file_post_open+0xb3/0x260 security/security.c:2755 do_open fs/namei.c:4839 [inline] path_openat+0x148a/0x1d60 fs/namei.c:5000 do_file_open+0x23e/0x4a0 fs/namei.c:5029 do_sys_openat2+0x115/0x200 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #4 (&p->frag_sem){.+.+}-{4:4}: down_read+0x97/0x200 kernel/locking/rwsem.c:1574 fill_read_buffer fs/configfs/file.c:66 [inline] configfs_read_iter+0x1cf/0x620 fs/configfs/file.c:88 __kernel_read+0x4d3/0x970 fs/read_write.c:532 integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:222 [inline] ima_calc_file_hash+0x45d/0x8a0 security/integrity/ima/ima_crypto.c:280 ima_collect_measurement+0x521/0xa10 security/integrity/ima/ima_api.c:300 process_measurement+0x1282/0x1c20 security/integrity/ima/ima_main.c:425 ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:685 security_file_post_open+0xb3/0x260 security/security.c:2755 do_open fs/namei.c:4839 [inline] path_openat+0x148a/0x1d60 fs/namei.c:5000 do_file_open+0x23e/0x4a0 fs/namei.c:5029 do_sys_openat2+0x115/0x200 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #3 (&buffer->mutex#2){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:559 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:578 configfs_read_iter+0x73/0x620 fs/configfs/file.c:86 __kernel_read+0x4d3/0x970 fs/read_write.c:532 integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:222 [inline] ima_calc_file_hash+0x45d/0x8a0 security/integrity/ima/ima_crypto.c:280 ima_collect_measurement+0x521/0xa10 security/integrity/ima/ima_api.c:300 process_measurement+0x1282/0x1c20 security/integrity/ima/ima_main.c:425 ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:685 security_file_post_open+0xb3/0x260 security/security.c:2755 do_open fs/namei.c:4839 [inline] path_openat+0x148a/0x1d60 fs/namei.c:5000 do_file_open+0x23e/0x4a0 fs/namei.c:5029 do_sys_openat2+0x115/0x200 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:559 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:578 process_measurement+0x7e0/0x1c20 security/integrity/ima/ima_main.c:319 ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:685 security_file_post_open+0xb3/0x260 security/security.c:2755 do_open fs/namei.c:4839 [inline] path_openat+0x148a/0x1d60 fs/namei.c:5000 do_file_open+0x23e/0x4a0 fs/namei.c:5029 file_open_name fs/open.c:1375 [inline] filp_open+0x16d/0x1d0 fs/open.c:1392 kernel_read_file_from_path_initns+0xde/0x1e0 fs/kernel_read_file.c:159 fw_get_filesystem_firmware drivers/base/firmware_loader/main.c:549 [inline] _request_firmware+0xa50/0x1780 drivers/base/firmware_loader/main.c:873 request_firmware+0x36/0x50 drivers/base/firmware_loader/main.c:948 reg_reload_regdb+0x95/0x490 net/wireless/reg.c:1067 genl_family_rcv_msg_doit+0x233/0x340 net/netlink/genetlink.c:1114 genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline] genl_rcv_msg+0x614/0x7a0 net/netlink/genetlink.c:1209 netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec+0x13a/0x180 net/socket.c:800 __sock_sendmsg net/socket.c:815 [inline] ____sys_sendmsg+0x565/0x870 net/socket.c:2713 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2767 __sys_sendmsg net/socket.c:2799 [inline] __do_sys_sendmsg net/socket.c:2804 [inline] __se_sys_sendmsg net/socket.c:2802 [inline] __x64_sys_sendmsg+0x1b7/0x290 net/socket.c:2802 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (cb_lock){++++}-{4:4}: down_read+0x97/0x200 kernel/locking/rwsem.c:1574 genl_rcv+0x19/0x40 net/netlink/genetlink.c:1217 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec+0x13a/0x180 net/socket.c:800 __sock_sendmsg net/socket.c:815 [inline] sock_sendmsg+0x1ca/0x2d0 net/socket.c:838 splice_to_socket+0xb61/0x12a0 fs/splice.c:884 do_splice_from fs/splice.c:936 [inline] do_splice+0xf29/0x1990 fs/splice.c:1349 __do_splice fs/splice.c:1431 [inline] __do_sys_splice fs/splice.c:1634 [inline] __se_sys_splice+0x353/0x490 fs/splice.c:1616 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&pipe->mutex){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3181 [inline] check_prevs_add kernel/locking/lockdep.c:3300 [inline] validate_chain kernel/locking/lockdep.c:3924 [inline] __lock_acquire+0x1520/0x2ce0 kernel/locking/lockdep.c:5253 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5886 __mutex_lock_common kernel/locking/rtmutex_api.c:559 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:578 iter_file_splice_write+0x20d/0x1240 fs/splice.c:682 do_splice_from fs/splice.c:936 [inline] do_splice+0xf29/0x1990 fs/splice.c:1349 __do_splice fs/splice.c:1431 [inline] __do_sys_splice fs/splice.c:1634 [inline] __se_sys_splice+0x353/0x490 fs/splice.c:1616 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &pipe->mutex --> &common->filesem --> sb_writers#5 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(sb_writers#5); lock(&common->filesem); lock(sb_writers#5); lock(&pipe->mutex); *** DEADLOCK *** locks held by syz.7.2569/18983: 1, last CPU#0: #0: ffff88801aeb2510 (sb_writers#5){.+.+}-{0:0}, at: do_splice+0xe99/0x1990 fs/splice.c:1348 stack backtrace: CPU: 0 UID: 0 PID: 18983 Comm: syz.7.2569 Tainted: G L syzkaller #0 PREEMPT_{RT,(full)} Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2059 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2191 check_prev_add kernel/locking/lockdep.c:3181 [inline] check_prevs_add kernel/locking/lockdep.c:3300 [inline] validate_chain kernel/locking/lockdep.c:3924 [inline] __lock_acquire+0x1520/0x2ce0 kernel/locking/lockdep.c:5253 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5886 __mutex_lock_common kernel/locking/rtmutex_api.c:559 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:578 iter_file_splice_write+0x20d/0x1240 fs/splice.c:682 do_splice_from fs/splice.c:936 [inline] do_splice+0xf29/0x1990 fs/splice.c:1349 __do_splice fs/splice.c:1431 [inline] __do_sys_splice fs/splice.c:1634 [inline] __se_sys_splice+0x353/0x490 fs/splice.c:1616 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb7b612e0d9 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:00007fb7b4386028 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007fb7b63b5fa0 RCX: 00007fb7b612e0d9 RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007fb7b61c5024 R08: 0000000000200002 R09: 000000000000000a R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fb7b63b6038 R14: 00007fb7b63b5fa0 R15: 00007ffd64a01aa8