====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.3.1135/8884 is trying to acquire lock: ffffffff8e2c9a10 (cb_lock){++++}-{3:3}, at: genl_rcv+0x15/0x40 net/netlink/genetlink.c:802 but task is already holding lock: ffff8880247b4068 (&pipe->mutex/1){+.+.}-{3:3}, at: splice_from_pipe fs/splice.c:596 [inline] ffff8880247b4068 (&pipe->mutex/1){+.+.}-{3:3}, at: generic_splice_sendpage+0xff/0x180 fs/splice.c:746 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #6 (&pipe->mutex/1){+.+.}-{3:3}: __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 iter_file_splice_write+0x1b6/0xcf0 fs/splice.c:635 do_splice_from fs/splice.c:767 [inline] do_splice+0xe51/0x1620 fs/splice.c:1108 __do_splice fs/splice.c:1173 [inline] __do_sys_splice fs/splice.c:1379 [inline] __se_sys_splice+0x34d/0x440 fs/splice.c:1361 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #5 (sb_writers#3){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1817 [inline] sb_start_write+0x4f/0x1c0 include/linux/fs.h:1887 mnt_want_write+0x3d/0x90 fs/namespace.c:386 open_last_lookups fs/namei.c:3572 [inline] path_openat+0x795/0x2fb0 fs/namei.c:3790 do_filp_open+0x1df/0x400 fs/namei.c:3820 file_open_name fs/open.c:1200 [inline] filp_open+0x17c/0x1e0 fs/open.c:1220 fsg_lun_open+0x63/0xee0 drivers/usb/gadget/function/storage_common.c:193 fsg_store_file+0x1a5/0x530 drivers/usb/gadget/function/storage_common.c:454 flush_write_buffer fs/configfs/file.c:207 [inline] configfs_write_iter+0x30b/0x400 fs/configfs/file.c:229 call_write_iter include/linux/fs.h:2179 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x748/0xd70 fs/read_write.c:594 ksys_write+0x153/0x260 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #4 (&common->filesem){++++}-{3:3}: down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 fsg_show_file+0x29/0x130 drivers/usb/gadget/function/storage_common.c:338 fill_read_buffer fs/configfs/file.c:68 [inline] configfs_read_iter+0x296/0x560 fs/configfs/file.c:88 __kernel_read+0x51d/0x980 fs/read_write.c:443 integrity_kernel_read+0x86/0xd0 security/integrity/iint.c:228 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+0x946/0x1940 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x335/0x7e0 security/integrity/ima/ima_api.c:255 process_measurement+0x1185/0x1c20 security/integrity/ima/ima_main.c:351 ima_file_check+0xc7/0x110 security/integrity/ima/ima_main.c:533 do_open fs/namei.c:3661 [inline] path_openat+0x27cf/0x2fb0 fs/namei.c:3793 do_filp_open+0x1df/0x400 fs/namei.c:3820 do_sys_openat2+0x14b/0x500 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #3 (&p->frag_sem){.+.+}-{3:3}: down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 fill_read_buffer fs/configfs/file.c:66 [inline] configfs_read_iter+0x19e/0x560 fs/configfs/file.c:88 __kernel_read+0x51d/0x980 fs/read_write.c:443 integrity_kernel_read+0x86/0xd0 security/integrity/iint.c:228 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+0x946/0x1940 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x335/0x7e0 security/integrity/ima/ima_api.c:255 process_measurement+0x1185/0x1c20 security/integrity/ima/ima_main.c:351 ima_file_check+0xc7/0x110 security/integrity/ima/ima_main.c:533 do_open fs/namei.c:3661 [inline] path_openat+0x27cf/0x2fb0 fs/namei.c:3793 do_filp_open+0x1df/0x400 fs/namei.c:3820 do_sys_openat2+0x14b/0x500 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #2 (&buffer->mutex){+.+.}-{3:3}: __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 configfs_read_iter+0x6e/0x560 fs/configfs/file.c:86 __kernel_read+0x51d/0x980 fs/read_write.c:443 integrity_kernel_read+0x86/0xd0 security/integrity/iint.c:228 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+0x946/0x1940 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x335/0x7e0 security/integrity/ima/ima_api.c:255 process_measurement+0x1185/0x1c20 security/integrity/ima/ima_main.c:351 ima_file_check+0xc7/0x110 security/integrity/ima/ima_main.c:533 do_open fs/namei.c:3661 [inline] path_openat+0x27cf/0x2fb0 fs/namei.c:3793 do_filp_open+0x1df/0x400 fs/namei.c:3820 do_sys_openat2+0x14b/0x500 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #1 (&iint_mutex_key[depth]){+.+.}-{3:3}: __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 process_measurement+0x724/0x1c20 security/integrity/ima/ima_main.c:261 ima_file_check+0xc7/0x110 security/integrity/ima/ima_main.c:533 do_open fs/namei.c:3661 [inline] path_openat+0x27cf/0x2fb0 fs/namei.c:3793 do_file_open_root+0x2e5/0x6b0 fs/namei.c:3845 file_open_root+0x163/0x1c0 fs/open.c:1235 kernel_read_file_from_path_initns+0x14d/0x220 fs/kernel_read_file.c:163 fw_get_filesystem_firmware+0x3c2/0xa50 drivers/base/firmware_loader/main.c:536 _request_firmware+0x9a7/0x12b0 drivers/base/firmware_loader/main.c:856 request_firmware+0x32/0x50 drivers/base/firmware_loader/main.c:925 reg_reload_regdb+0x8d/0x1e0 net/wireless/reg.c:1113 genl_family_rcv_msg_doit net/netlink/genetlink.c:731 [inline] genl_family_rcv_msg net/netlink/genetlink.c:775 [inline] genl_rcv_msg+0xd0b/0xfa0 net/netlink/genetlink.c:792 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2527 genl_rcv+0x24/0x40 net/netlink/genetlink.c:803 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x804/0x9e0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2446 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2500 __sys_sendmsg net/socket.c:2529 [inline] __do_sys_sendmsg net/socket.c:2538 [inline] __se_sys_sendmsg+0x1b7/0x2a0 net/socket.c:2536 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (cb_lock){++++}-{3:3}: check_prev_add kernel/locking/lockdep.c:3120 [inline] check_prevs_add kernel/locking/lockdep.c:3239 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737 down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 genl_rcv+0x15/0x40 net/netlink/genetlink.c:802 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x804/0x9e0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] sock_sendmsg net/socket.c:741 [inline] kernel_sendmsg+0x23e/0x350 net/socket.c:765 sock_no_sendpage+0x12a/0x1a0 net/core/sock.c:3044 kernel_sendpage+0x2cc/0x380 net/socket.c:3549 sock_sendpage+0x7a/0xb0 net/socket.c:1028 pipe_to_sendpage+0x22f/0x320 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x333/0x8e0 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0x111/0x180 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] do_splice+0xe51/0x1620 fs/splice.c:1108 __do_splice fs/splice.c:1173 [inline] __do_sys_splice fs/splice.c:1379 [inline] __se_sys_splice+0x34d/0x440 fs/splice.c:1361 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Chain exists of: cb_lock --> sb_writers#3 --> &pipe->mutex/1 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&pipe->mutex/1); lock(sb_writers#3); lock(&pipe->mutex/1); rlock(cb_lock); *** DEADLOCK *** 1 lock held by syz.3.1135/8884: #0: ffff8880247b4068 (&pipe->mutex/1){+.+.}-{3:3}, at: splice_from_pipe fs/splice.c:596 [inline] #0: ffff8880247b4068 (&pipe->mutex/1){+.+.}-{3:3}, at: generic_splice_sendpage+0xff/0x180 fs/splice.c:746 stack backtrace: CPU: 1 PID: 8884 Comm: syz.3.1135 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3120 [inline] check_prevs_add kernel/locking/lockdep.c:3239 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737 down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 genl_rcv+0x15/0x40 net/netlink/genetlink.c:802 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x804/0x9e0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] sock_sendmsg net/socket.c:741 [inline] kernel_sendmsg+0x23e/0x350 net/socket.c:765 sock_no_sendpage+0x12a/0x1a0 net/core/sock.c:3044 kernel_sendpage+0x2cc/0x380 net/socket.c:3549 sock_sendpage+0x7a/0xb0 net/socket.c:1028 pipe_to_sendpage+0x22f/0x320 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x333/0x8e0 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0x111/0x180 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] do_splice+0xe51/0x1620 fs/splice.c:1108 __do_splice fs/splice.c:1173 [inline] __do_sys_splice fs/splice.c:1379 [inline] __se_sys_splice+0x34d/0x440 fs/splice.c:1361 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fd8efc48559 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:00007fd8ede9f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007fd8efecefa0 RCX: 00007fd8efc48559 RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fd8efcdfb50 R08: 0000000000003000 R09: 100000000000000d R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fd8efecf038 R14: 00007fd8efecefa0 R15: 00007ffd557631f8