====================================================== WARNING: possible circular locking dependency detected 5.10.0-rc1-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/13098 is trying to acquire lock: ffff88803119d868 (&pipe->mutex/1){+.+.}-{3:3}, at: iter_file_splice_write+0x157/0xaa0 fs/splice.c:635 but task is already holding lock: ffff888149886460 (sb_writers#5){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2759 [inline] ffff888149886460 (sb_writers#5){.+.+}-{0:0}, at: do_splice+0xdfe/0x1700 fs/splice.c:1058 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sb_writers#5){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write+0x173/0x320 fs/super.c:1674 file_start_write include/linux/fs.h:2759 [inline] ovl_write_iter+0xcca/0x1160 fs/overlayfs/file.c:362 call_write_iter include/linux/fs.h:1887 [inline] do_iter_readv_writev+0x333/0x6d0 fs/read_write.c:740 do_iter_write+0x12a/0x5b0 fs/read_write.c:866 iter_file_splice_write+0x566/0xaa0 fs/splice.c:686 do_splice_from fs/splice.c:764 [inline] do_splice+0x916/0x1700 fs/splice.c:1059 __do_splice+0xf4/0x1b0 fs/splice.c:1137 __do_sys_splice fs/splice.c:1343 [inline] __se_sys_splice fs/splice.c:1325 [inline] __x64_sys_splice+0x14a/0x200 fs/splice.c:1325 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&ovl_i_mutex_key[depth]){+.+.}-{3:3}: down_write+0x8d/0x150 kernel/locking/rwsem.c:1531 inode_lock include/linux/fs.h:774 [inline] ovl_write_iter+0x152/0x1160 fs/overlayfs/file.c:346 call_write_iter include/linux/fs.h:1887 [inline] do_iter_readv_writev+0x333/0x6d0 fs/read_write.c:740 do_iter_write+0x12a/0x5b0 fs/read_write.c:866 iter_file_splice_write+0x566/0xaa0 fs/splice.c:686 do_splice_from fs/splice.c:764 [inline] do_splice+0x916/0x1700 fs/splice.c:1059 __do_splice+0xf4/0x1b0 fs/splice.c:1137 __do_sys_splice fs/splice.c:1343 [inline] __se_sys_splice fs/splice.c:1325 [inline] __x64_sys_splice+0x14a/0x200 fs/splice.c:1325 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&pipe->mutex/1){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:2864 [inline] check_prevs_add kernel/locking/lockdep.c:2989 [inline] validate_chain kernel/locking/lockdep.c:3607 [inline] __lock_acquire+0x2853/0x5920 kernel/locking/lockdep.c:4837 lock_acquire kernel/locking/lockdep.c:5442 [inline] lock_acquire+0x2a3/0x910 kernel/locking/lockdep.c:5407 __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x134/0x1210 kernel/locking/mutex.c:1103 iter_file_splice_write+0x157/0xaa0 fs/splice.c:635 do_splice_from fs/splice.c:764 [inline] do_splice+0x916/0x1700 fs/splice.c:1059 __do_splice+0xf4/0x1b0 fs/splice.c:1137 __do_sys_splice fs/splice.c:1343 [inline] __se_sys_splice fs/splice.c:1325 [inline] __x64_sys_splice+0x14a/0x200 fs/splice.c:1325 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Chain exists of: &pipe->mutex/1 --> &ovl_i_mutex_key[depth] --> sb_writers#5 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#5); lock(&ovl_i_mutex_key[depth]); lock(sb_writers#5); lock(&pipe->mutex/1); *** DEADLOCK *** 1 lock held by syz-executor.4/13098: #0: ffff888149886460 (sb_writers#5){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2759 [inline] #0: ffff888149886460 (sb_writers#5){.+.+}-{0:0}, at: do_splice+0xdfe/0x1700 fs/splice.c:1058 stack backtrace: CPU: 0 PID: 13098 Comm: syz-executor.4 Not tainted 5.10.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x9a/0xcc lib/dump_stack.c:118 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2115 check_prev_add kernel/locking/lockdep.c:2864 [inline] check_prevs_add kernel/locking/lockdep.c:2989 [inline] validate_chain kernel/locking/lockdep.c:3607 [inline] __lock_acquire+0x2853/0x5920 kernel/locking/lockdep.c:4837 lock_acquire kernel/locking/lockdep.c:5442 [inline] lock_acquire+0x2a3/0x910 kernel/locking/lockdep.c:5407 __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x134/0x1210 kernel/locking/mutex.c:1103 iter_file_splice_write+0x157/0xaa0 fs/splice.c:635 do_splice_from fs/splice.c:764 [inline] do_splice+0x916/0x1700 fs/splice.c:1059 __do_splice+0xf4/0x1b0 fs/splice.c:1137 __do_sys_splice fs/splice.c:1343 [inline] __se_sys_splice fs/splice.c:1325 [inline] __x64_sys_splice+0x14a/0x200 fs/splice.c:1325 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4665e9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6752b6e188 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 000000000056c038 RCX: 00000000004665e9 RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00000000004bfcc4 R08: 000000000004ffdc R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c038 R13: 00007fff8b65b44f R14: 00007f6752b6e300 R15: 0000000000022000 overlayfs: upperdir is in-use as upperdir/workdir of another mount, mount with '-o index=off' to override exclusive upperdir protection.