====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/30817 is trying to acquire lock: 0000000073c0889d (&pipe->mutex/1){+.+.}, at: pipe_lock_nested fs/pipe.c:77 [inline] 0000000073c0889d (&pipe->mutex/1){+.+.}, at: pipe_lock+0x63/0x80 fs/pipe.c:85 but task is already holding lock: 000000000eaa2457 (sb_writers#3){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline] 000000000eaa2457 (sb_writers#3){.+.+}, at: do_splice fs/splice.c:1153 [inline] 000000000eaa2457 (sb_writers#3){.+.+}, at: __do_sys_splice fs/splice.c:1428 [inline] 000000000eaa2457 (sb_writers#3){.+.+}, at: __se_sys_splice+0x11de/0x16d0 fs/splice.c:1408 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sb_writers#3){.+.+}: sb_start_write include/linux/fs.h:1579 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:360 ovl_do_remove+0xf0/0xdb0 fs/overlayfs/dir.c:845 vfs_unlink+0x27d/0x4e0 fs/namei.c:4002 do_unlinkat+0x3b8/0x660 fs/namei.c:4065 __do_sys_unlinkat fs/namei.c:4107 [inline] __se_sys_unlinkat fs/namei.c:4099 [inline] __x64_sys_unlinkat+0xbd/0x120 fs/namei.c:4099 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #1 (&ovl_i_mutex_key[depth]#2){+.+.}: inode_lock include/linux/fs.h:748 [inline] ovl_write_iter+0x148/0xb40 fs/overlayfs/file.c:270 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 __kernel_write+0x109/0x370 fs/read_write.c:506 write_pipe_buf+0x153/0x1f0 fs/splice.c:798 splice_from_pipe_feed fs/splice.c:503 [inline] __splice_from_pipe+0x389/0x800 fs/splice.c:627 splice_from_pipe fs/splice.c:662 [inline] default_file_splice_write+0xd8/0x180 fs/splice.c:810 do_splice_from fs/splice.c:852 [inline] do_splice fs/splice.c:1154 [inline] __do_sys_splice fs/splice.c:1428 [inline] __se_sys_splice+0xfe7/0x16d0 fs/splice.c:1408 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&pipe->mutex/1){+.+.}: __mutex_lock_common kernel/locking/mutex.c:937 [inline] __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078 pipe_lock_nested fs/pipe.c:77 [inline] pipe_lock+0x63/0x80 fs/pipe.c:85 iter_file_splice_write+0x183/0xbb0 fs/splice.c:700 do_splice_from fs/splice.c:852 [inline] do_splice fs/splice.c:1154 [inline] __do_sys_splice fs/splice.c:1428 [inline] __se_sys_splice+0xfe7/0x16d0 fs/splice.c:1408 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: &pipe->mutex/1 --> &ovl_i_mutex_key[depth]#2 --> sb_writers#3 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#3); lock(&ovl_i_mutex_key[depth]#2); lock(sb_writers#3); lock(&pipe->mutex/1); *** DEADLOCK *** 1 lock held by syz-executor.5/30817: #0: 000000000eaa2457 (sb_writers#3){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline] #0: 000000000eaa2457 (sb_writers#3){.+.+}, at: do_splice fs/splice.c:1153 [inline] #0: 000000000eaa2457 (sb_writers#3){.+.+}, at: __do_sys_splice fs/splice.c:1428 [inline] #0: 000000000eaa2457 (sb_writers#3){.+.+}, at: __se_sys_splice+0x11de/0x16d0 fs/splice.c:1408 stack backtrace: CPU: 1 PID: 30817 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __mutex_lock_common kernel/locking/mutex.c:937 [inline] __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078 pipe_lock_nested fs/pipe.c:77 [inline] pipe_lock+0x63/0x80 fs/pipe.c:85 iter_file_splice_write+0x183/0xbb0 fs/splice.c:700 do_splice_from fs/splice.c:852 [inline] do_splice fs/splice.c:1154 [inline] __do_sys_splice fs/splice.c:1428 [inline] __se_sys_splice+0xfe7/0x16d0 fs/splice.c:1408 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f3ba93fe0f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3ba78ec168 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007f3ba951e2c0 RCX: 00007f3ba93fe0f9 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 00007f3ba9459ae9 R08: 000000000000fdef R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd5b9de32f R14: 00007f3ba78ec300 R15: 0000000000022000 overlayfs: './file0' not a directory ieee80211 ©,í…×: Selected rate control algorithm 'minstrel_ht' ieee80211 phy19: Selected rate control algorithm 'minstrel_ht' ieee80211 phy20: Selected rate control algorithm 'minstrel_ht' ieee80211 phy21: Selected rate control algorithm 'minstrel_ht' audit: type=1800 audit(1677421427.662:20985): pid=31348 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13925 res=0 audit: type=1800 audit(1677421427.752:20986): pid=31366 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=14002 res=0 audit: type=1800 audit(1677421427.752:20987): pid=31362 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=14002 res=0 audit: type=1800 audit(1677421427.862:20988): pid=31381 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13937 res=0 audit: type=1800 audit(1677421428.832:20989): pid=31577 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=14035 res=0 audit: type=1800 audit(1677421428.902:20990): pid=31584 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13925 res=0 audit: type=1800 audit(1677421428.902:20991): pid=31584 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13925 res=0 audit: type=1800 audit(1677421428.902:20992): pid=31584 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13925 res=0 audit: type=1800 audit(1677421428.902:20993): pid=31584 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13925 res=0 audit: type=1800 audit(1677421428.902:20994): pid=31584 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13925 res=0 audit: type=1800 audit(1677421428.902:20995): pid=31584 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13925 res=0 audit: type=1800 audit(1677421428.902:20996): pid=31584 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13925 res=0 audit: type=1800 audit(1677421428.902:20997): pid=31584 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13925 res=0 audit: type=1800 audit(1677421428.902:20998): pid=31584 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13925 res=0 audit: type=1800 audit(1677421428.902:20999): pid=31584 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file2" dev="sda1" ino=13925 res=0