====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc4-syzkaller-00148-g50736169ecc8 #0 Not tainted ------------------------------------------------------ syz-executor.3/9553 is trying to acquire lock: ffff88801f0380a0 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xb7/0xd60 fs/seq_file.c:182 but task is already holding lock: ffff88807e228468 (&pipe->mutex){+.+.}-{3:3}, at: splice_file_to_pipe+0x2e/0x500 fs/splice.c:1292 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&pipe->mutex){+.+.}-{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 pipe_write+0x1c9/0x1a40 fs/pipe.c:455 __kernel_write_iter+0x480/0x900 fs/read_write.c:523 __kernel_write+0x120/0x180 fs/read_write.c:543 autofs_write fs/autofs/waitq.c:57 [inline] autofs_notify_daemon+0x732/0xf80 fs/autofs/waitq.c:164 autofs_wait+0x10b8/0x1b30 fs/autofs/waitq.c:426 autofs_mount_wait+0x170/0x330 fs/autofs/root.c:255 autofs_d_automount+0x555/0x710 fs/autofs/root.c:401 follow_automount fs/namei.c:1368 [inline] __traverse_mounts+0x2bc/0x580 fs/namei.c:1413 traverse_mounts fs/namei.c:1442 [inline] handle_mounts fs/namei.c:1545 [inline] step_into+0x5e5/0x1080 fs/namei.c:1842 lookup_last fs/namei.c:2469 [inline] path_lookupat+0x16f/0x450 fs/namei.c:2493 filename_lookup+0x256/0x610 fs/namei.c:2522 kern_path+0x35/0x50 fs/namei.c:2630 lookup_bdev+0xc5/0x290 block/bdev.c:1157 resume_store+0x1a0/0x710 kernel/power/hibernate.c:1235 kernfs_fop_write_iter+0x3a3/0x500 fs/kernfs/file.c:334 new_sync_write fs/read_write.c:497 [inline] vfs_write+0xa74/0xc90 fs/read_write.c:590 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (&sbi->pipe_mutex){+.+.}-{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 autofs_write fs/autofs/waitq.c:55 [inline] autofs_notify_daemon+0x71f/0xf80 fs/autofs/waitq.c:164 autofs_wait+0x10b8/0x1b30 fs/autofs/waitq.c:426 autofs_mount_wait+0x170/0x330 fs/autofs/root.c:255 autofs_d_automount+0x555/0x710 fs/autofs/root.c:401 follow_automount fs/namei.c:1368 [inline] __traverse_mounts+0x2bc/0x580 fs/namei.c:1413 traverse_mounts fs/namei.c:1442 [inline] handle_mounts fs/namei.c:1545 [inline] step_into+0x5e5/0x1080 fs/namei.c:1842 lookup_last fs/namei.c:2469 [inline] path_lookupat+0x16f/0x450 fs/namei.c:2493 filename_lookup+0x256/0x610 fs/namei.c:2522 kern_path+0x35/0x50 fs/namei.c:2630 lookup_bdev+0xc5/0x290 block/bdev.c:1157 resume_store+0x1a0/0x710 kernel/power/hibernate.c:1235 kernfs_fop_write_iter+0x3a3/0x500 fs/kernfs/file.c:334 new_sync_write fs/read_write.c:497 [inline] vfs_write+0xa74/0xc90 fs/read_write.c:590 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&of->mutex){+.+.}-{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 kernfs_seq_start+0x53/0x3b0 fs/kernfs/file.c:154 seq_read_iter+0x3d2/0xd60 fs/seq_file.c:225 copy_splice_read+0x664/0xb60 fs/splice.c:365 do_splice_read fs/splice.c:985 [inline] splice_direct_to_actor+0x4b9/0xc90 fs/splice.c:1089 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0x28c/0x3e0 fs/splice.c:1233 do_sendfile+0x56d/0xe10 fs/read_write.c:1295 __do_sys_sendfile64 fs/read_write.c:1362 [inline] __se_sys_sendfile64+0x17c/0x1e0 fs/read_write.c:1348 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&p->lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18e0/0x5900 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 seq_read_iter+0xb7/0xd60 fs/seq_file.c:182 proc_reg_read_iter+0x1c5/0x290 fs/proc/inode.c:299 copy_splice_read+0x664/0xb60 fs/splice.c:365 do_splice_read fs/splice.c:985 [inline] splice_file_to_pipe+0x29b/0x500 fs/splice.c:1295 do_sendfile+0x515/0xe10 fs/read_write.c:1301 __do_sys_sendfile64 fs/read_write.c:1362 [inline] __se_sys_sendfile64+0x17c/0x1e0 fs/read_write.c:1348 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &p->lock --> &sbi->pipe_mutex --> &pipe->mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&pipe->mutex); lock(&sbi->pipe_mutex); lock(&pipe->mutex); lock(&p->lock); *** DEADLOCK *** 1 lock held by syz-executor.3/9553: #0: ffff88807e228468 (&pipe->mutex){+.+.}-{3:3}, at: splice_file_to_pipe+0x2e/0x500 fs/splice.c:1292 stack backtrace: CPU: 1 PID: 9553 Comm: syz-executor.3 Not tainted 6.10.0-rc4-syzkaller-00148-g50736169ecc8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/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+0x18e0/0x5900 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 seq_read_iter+0xb7/0xd60 fs/seq_file.c:182 proc_reg_read_iter+0x1c5/0x290 fs/proc/inode.c:299 copy_splice_read+0x664/0xb60 fs/splice.c:365 do_splice_read fs/splice.c:985 [inline] splice_file_to_pipe+0x29b/0x500 fs/splice.c:1295 do_sendfile+0x515/0xe10 fs/read_write.c:1301 __do_sys_sendfile64 fs/read_write.c:1362 [inline] __se_sys_sendfile64+0x17c/0x1e0 fs/read_write.c:1348 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6b42c7cf29 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:00007f6b439ca0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f6b42db3f80 RCX: 00007f6b42c7cf29 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000005 RBP: 00007f6b42cec074 R08: 0000000000000000 R09: 0000000000000000 R10: 0000020000023896 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f6b42db3f80 R15: 00007ffef097b618