audit: type=1804 audit(1670960728.864:100): pid=16760 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir1456702104/syzkaller.oyxk0u/224/file0/bus" dev="loop2" ino=43 res=1 ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/16762 is trying to acquire lock: 00000000fbf98506 (&pipe->mutex/1){+.+.}, at: pipe_lock_nested fs/pipe.c:77 [inline] 00000000fbf98506 (&pipe->mutex/1){+.+.}, at: pipe_lock+0x63/0x80 fs/pipe.c:85 but task is already holding lock: 000000008f35f24e (sb_writers#3){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline] 000000008f35f24e (sb_writers#3){.+.+}, at: do_splice fs/splice.c:1153 [inline] 000000008f35f24e (sb_writers#3){.+.+}, at: __do_sys_splice fs/splice.c:1428 [inline] 000000008f35f24e (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){.+.+}: file_start_write include/linux/fs.h:2779 [inline] ovl_write_iter+0x932/0xb40 fs/overlayfs/file.c:282 call_write_iter include/linux/fs.h:1821 [inline] do_iter_readv_writev+0x668/0x790 fs/read_write.c:681 do_iter_write+0x182/0x5d0 fs/read_write.c:960 vfs_writev+0x153/0x2e0 fs/read_write.c:1005 do_pwritev+0x1b6/0x270 fs/read_write.c:1094 __do_sys_pwritev2 fs/read_write.c:1153 [inline] __se_sys_pwritev2 fs/read_write.c:1144 [inline] __x64_sys_pwritev2+0xeb/0x150 fs/read_write.c:1144 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.4/16762: #0: 000000008f35f24e (sb_writers#3){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline] #0: 000000008f35f24e (sb_writers#3){.+.+}, at: do_splice fs/splice.c:1153 [inline] #0: 000000008f35f24e (sb_writers#3){.+.+}, at: __do_sys_splice fs/splice.c:1428 [inline] #0: 000000008f35f24e (sb_writers#3){.+.+}, at: __se_sys_splice+0x11de/0x16d0 fs/splice.c:1408 stack backtrace: CPU: 0 PID: 16762 Comm: syz-executor.4 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 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:0x7f4ae277b0d9 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:00007f4ae0ced168 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007f4ae289af80 RCX: 00007f4ae277b0d9 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007f4ae27d6ae9 R08: 0000000000000006 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffccb66705f R14: 00007f4ae0ced300 R15: 0000000000022000 XFS (loop2): Unmounting Filesystem XFS (loop3): DAX enabled. Warning: EXPERIMENTAL, use at your own risk XFS (loop3): DAX unsupported by block device. Turning off DAX. XFS (loop3): Mounting V4 Filesystem XFS (loop1): DAX enabled. Warning: EXPERIMENTAL, use at your own risk XFS (loop3): Ending clean mount XFS (loop1): DAX unsupported by block device. Turning off DAX. XFS (loop3): Quotacheck needed: Please wait. XFS (loop1): Mounting V4 Filesystem XFS (loop3): Quotacheck: Done. XFS (loop1): Ending clean mount XFS (loop1): Quotacheck needed: Please wait. audit: type=1804 audit(1670960729.974:101): pid=16756 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir3028344056/syzkaller.PsjSrx/212/file0/bus" dev="loop3" ino=43 res=1 XFS (loop1): Quotacheck: Done. audit: type=1804 audit(1670960730.064:102): pid=16803 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir3028344056/syzkaller.PsjSrx/212/file0/bus" dev="loop3" ino=43 res=1 XFS (loop3): Unmounting Filesystem XFS (loop1): Unmounting Filesystem XFS (loop5): DAX enabled. Warning: EXPERIMENTAL, use at your own risk XFS (loop5): DAX unsupported by block device. Turning off DAX. XFS (loop5): Mounting V4 Filesystem XFS (loop5): Ending clean mount XFS (loop5): Quotacheck needed: Please wait. XFS (loop5): Quotacheck: Done. XFS (loop2): DAX enabled. Warning: EXPERIMENTAL, use at your own risk XFS (loop2): DAX unsupported by block device. Turning off DAX. XFS (loop2): Mounting V4 Filesystem XFS (loop2): Ending clean mount XFS (loop2): Quotacheck needed: Please wait. XFS (loop2): Quotacheck: Done. XFS (loop3): DAX enabled. Warning: EXPERIMENTAL, use at your own risk XFS (loop3): DAX unsupported by block device. Turning off DAX. XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount XFS (loop3): Quotacheck needed: Please wait. XFS (loop3): Quotacheck: Done. XFS (loop2): Unmounting Filesystem XFS (loop5): Unmounting Filesystem XFS (loop3): Unmounting Filesystem XFS (loop1): DAX enabled. Warning: EXPERIMENTAL, use at your own risk XFS (loop1): DAX unsupported by block device. Turning off DAX. XFS (loop1): Mounting V4 Filesystem XFS (loop1): Ending clean mount XFS (loop1): Quotacheck needed: Please wait. XFS (loop1): Quotacheck: Done. XFS (loop2): DAX enabled. Warning: EXPERIMENTAL, use at your own risk XFS (loop2): DAX unsupported by block device. Turning off DAX. kauditd_printk_skb: 8 callbacks suppressed audit: type=1804 audit(1670960732.104:111): pid=16872 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.1" name="/root/syzkaller-testdir928144008/syzkaller.m95qkh/189/file0/bus" dev="loop1" ino=43 res=1 XFS (loop2): Mounting V4 Filesystem XFS (loop2): Ending clean mount XFS (loop2): Quotacheck needed: Please wait. XFS (loop2): Quotacheck: Done. XFS (loop3): DAX enabled. Warning: EXPERIMENTAL, use at your own risk XFS (loop3): DAX unsupported by block device. Turning off DAX. audit: type=1804 audit(1670960732.244:112): pid=16941 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.1" name="/root/syzkaller-testdir928144008/syzkaller.m95qkh/189/file0/bus" dev="loop1" ino=43 res=1 audit: type=1804 audit(1670960732.274:113): pid=16894 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir1456702104/syzkaller.oyxk0u/226/file0/bus" dev="loop2" ino=43 res=1 XFS (loop3): Mounting V4 Filesystem XFS (loop5): DAX enabled. Warning: EXPERIMENTAL, use at your own risk audit: type=1804 audit(1670960732.334:114): pid=16953 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir1456702104/syzkaller.oyxk0u/226/file0/bus" dev="loop2" ino=43 res=1 XFS (loop5): DAX unsupported by block device. Turning off DAX. XFS (loop3): Ending clean mount XFS (loop5): Mounting V4 Filesystem XFS (loop1): Unmounting Filesystem XFS (loop3): Quotacheck needed: Please wait. IPVS: ftp: loaded support on port[0] = 21 XFS (loop3): Quotacheck: Done. XFS (loop5): Ending clean mount XFS (loop5): Quotacheck needed: Please wait. XFS (loop5): Quotacheck: Done. audit: type=1804 audit(1670960732.564:115): pid=16904 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir3028344056/syzkaller.PsjSrx/214/file0/bus" dev="loop3" ino=43 res=1 XFS (loop2): Unmounting Filesystem audit: type=1804 audit(1670960732.594:116): pid=16900 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir4268994901/syzkaller.fENQY9/193/file0/bus" dev="loop5" ino=43 res=1 audit: type=1804 audit(1670960732.644:117): pid=16974 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir3028344056/syzkaller.PsjSrx/214/file0/bus" dev="loop3" ino=43 res=1 XFS (loop5): Unmounting Filesystem XFS (loop3): Unmounting Filesystem audit: type=1804 audit(1670960732.704:118): pid=16983 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir4268994901/syzkaller.fENQY9/193/file0/bus" dev="loop5" ino=43 res=1 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 dccp_close: ABORT with 123 bytes unread BTRFS: device fsid c9fe44da-de57-406a-8241-57ec7d4412cf devid 55809 transid 8 /dev/loop5 BTRFS error (device loop5): superblock checksum mismatch BTRFS error (device loop5): open_ctree failed dccp_close: ABORT with 123 bytes unread BTRFS error (device loop5): superblock checksum mismatch BTRFS error (device loop5): open_ctree failed dccp_close: ABORT with 123 bytes unread dccp_close: ABORT with 123 bytes unread BTRFS error (device loop5): superblock checksum mismatch BTRFS error (device loop5): open_ctree failed BTRFS error (device loop5): superblock checksum mismatch audit: type=1804 audit(1670960736.155:119): pid=17323 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.0" name="/root/syzkaller-testdir372210928/syzkaller.Hpqza5/221/file0/bus" dev="ramfs" ino=53012 res=1 BTRFS error (device loop5): open_ctree failed audit: type=1804 audit(1670960736.155:120): pid=17323 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.0" name="/root/syzkaller-testdir372210928/syzkaller.Hpqza5/221/file0/bus" dev="ramfs" ino=53012 res=1 kauditd_printk_skb: 1 callbacks suppressed audit: type=1804 audit(1670960737.075:122): pid=17375 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.0" name="/root/syzkaller-testdir372210928/syzkaller.Hpqza5/222/file0/bus" dev="ramfs" ino=53132 res=1 audit: type=1804 audit(1670960737.085:123): pid=17375 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.0" name="/root/syzkaller-testdir372210928/syzkaller.Hpqza5/222/file0/bus" dev="ramfs" ino=53132 res=1 audit: type=1804 audit(1670960737.345:124): pid=17374 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.0" name="/root/syzkaller-testdir372210928/syzkaller.Hpqza5/222/file0/bus" dev="ramfs" ino=53132 res=1