audit: type=1800 audit(1677777690.405:301): pid=17294 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14717 res=0 audit: type=1804 audit(1677777690.805:302): pid=17314 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir3134318273/syzkaller.JToo49/154/bus/bus" dev="overlay" ino=14735 res=1 ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/17313 is trying to acquire lock: 0000000035923554 (&ovl_i_mutex_key[depth]){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] 0000000035923554 (&ovl_i_mutex_key[depth]){+.+.}, at: ovl_write_iter+0x148/0xb40 fs/overlayfs/file.c:270 but task is already holding lock: 0000000000f9a157 (&pipe->mutex/1){+.+.}, at: pipe_lock_nested fs/pipe.c:77 [inline] 0000000000f9a157 (&pipe->mutex/1){+.+.}, at: pipe_lock fs/pipe.c:85 [inline] 0000000000f9a157 (&pipe->mutex/1){+.+.}, at: pipe_wait+0x1bd/0x1e0 fs/pipe.c:133 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&pipe->mutex/1){+.+.}: 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 -> #1 (sb_writers#3){.+.+}: sb_start_write include/linux/fs.h:1579 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:360 ovl_xattr_set+0x53/0x600 fs/overlayfs/inode.c:338 __vfs_removexattr+0xf3/0x160 fs/xattr.c:413 cap_inode_killpriv+0x19/0x40 security/commoncap.c:322 security_inode_killpriv+0x40/0x90 security/security.c:802 setattr_prepare+0x19b/0x7e0 fs/attr.c:110 ovl_setattr+0x7c/0x920 fs/overlayfs/inode.c:26 notify_change+0x70b/0xfc0 fs/attr.c:334 do_truncate+0x134/0x1f0 fs/open.c:63 handle_truncate fs/namei.c:3009 [inline] do_last fs/namei.c:3427 [inline] path_openat+0x2308/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&ovl_i_mutex_key[depth]){+.+.}: down_write+0x34/0x90 kernel/locking/rwsem.c:70 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 other info that might help us debug this: Chain exists of: &ovl_i_mutex_key[depth] --> sb_writers#3 --> &pipe->mutex/1 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&pipe->mutex/1); lock(sb_writers#3); lock(&pipe->mutex/1); lock(&ovl_i_mutex_key[depth]); *** DEADLOCK *** 2 locks held by syz-executor.5/17313: #0: 00000000ebe8baaf (sb_writers#16){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline] #0: 00000000ebe8baaf (sb_writers#16){.+.+}, at: do_splice fs/splice.c:1153 [inline] #0: 00000000ebe8baaf (sb_writers#16){.+.+}, at: __do_sys_splice fs/splice.c:1428 [inline] #0: 00000000ebe8baaf (sb_writers#16){.+.+}, at: __se_sys_splice+0x11de/0x16d0 fs/splice.c:1408 #1: 0000000000f9a157 (&pipe->mutex/1){+.+.}, at: pipe_lock_nested fs/pipe.c:77 [inline] #1: 0000000000f9a157 (&pipe->mutex/1){+.+.}, at: pipe_lock fs/pipe.c:85 [inline] #1: 0000000000f9a157 (&pipe->mutex/1){+.+.}, at: pipe_wait+0x1bd/0x1e0 fs/pipe.c:133 stack backtrace: CPU: 1 PID: 17313 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 down_write+0x34/0x90 kernel/locking/rwsem.c:70 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 RIP: 0033:0x7fa92eeae0f9 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:00007fa92d420168 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007fa92efcdf80 RCX: 00007fa92eeae0f9 RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fa92ef09ae9 R08: 000000000000fdef R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe26dcdfef R14: 00007fa92d420300 R15: 0000000000022000 audit: type=1800 audit(1677777691.455:303): pid=17322 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14068 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready audit: type=1800 audit(1677777691.585:304): pid=17376 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14004 res=0 print_req_error: 243 callbacks suppressed print_req_error: I/O error, dev loop4, sector 34 overlayfs: upperdir is in-use as upperdir/workdir of another mount, mount with '-o index=off' to override exclusive upperdir protection. print_req_error: I/O error, dev loop4, sector 56 print_req_error: I/O error, dev loop4, sector 105 print_req_error: I/O error, dev loop4, sector 56 IPv6: ADDRCONF(NETDEV_CHANGE): tunl0: link becomes ready buffer_io_error: 210 callbacks suppressed Buffer I/O error on dev loop4p2, logical block 8, async page read print_req_error: I/O error, dev loop4, sector 57 Buffer I/O error on dev loop4p2, logical block 9, async page read print_req_error: I/O error, dev loop4, sector 58 Buffer I/O error on dev loop4p2, logical block 10, async page read print_req_error: I/O error, dev loop4, sector 59 Buffer I/O error on dev loop4p2, logical block 11, async page read print_req_error: I/O error, dev loop4, sector 60 Buffer I/O error on dev loop4p2, logical block 12, async page read print_req_error: I/O error, dev loop4, sector 61 IPv6: ADDRCONF(NETDEV_CHANGE): gre0: link becomes ready Buffer I/O error on dev loop4p2, logical block 13, async page read print_req_error: I/O error, dev loop4, sector 62 Buffer I/O error on dev loop4p2, logical block 14, async page read Buffer I/O error on dev loop4p2, logical block 15, async page read Buffer I/O error on dev loop4p3, logical block 8, async page read Buffer I/O error on dev loop4p3, logical block 9, async page read IPv6: ADDRCONF(NETDEV_CHANGE): gretap0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): erspan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ip_vti0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ip6_vti0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): tunl0: link becomes ready overlayfs: filesystem on './bus' not supported as upperdir IPv6: ADDRCONF(NETDEV_CHANGE): gre0: link becomes ready overlayfs: filesystem on './bus' not supported as upperdir IPv6: ADDRCONF(NETDEV_CHANGE): gretap0: link becomes ready overlayfs: failed to resolve './bus': -2 IPv6: ADDRCONF(NETDEV_CHANGE): erspan0: link becomes ready overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 IPv6: ADDRCONF(NETDEV_CHANGE): ip_vti0: link becomes ready overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 IPv6: ADDRCONF(NETDEV_CHANGE): ip6_vti0: link becomes ready overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 audit: type=1800 audit(1677777692.435:305): pid=17467 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=13938 res=0 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 overlayfs: failed to resolve './bus': -2 audit: type=1800 audit(1677777692.575:306): pid=17499 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14036 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): tunl0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): gre0: link becomes ready audit: type=1800 audit(1677777692.725:307): pid=17534 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14036 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): gretap0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): erspan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ip_vti0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ip6_vti0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): tunl0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): gre0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): gretap0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): erspan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ip_vti0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ip6_vti0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): tunl0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): gre0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): gretap0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): erspan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ip_vti0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ip6_vti0: link becomes ready kauditd_printk_skb: 3 callbacks suppressed audit: type=1800 audit(1677777694.345:311): pid=17690 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14307 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready audit: type=1800 audit(1677777694.425:312): pid=17709 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14748 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): tunl0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): gre0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): gretap0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): erspan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ip_vti0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ip6_vti0: link becomes ready audit: type=1800 audit(1677777695.205:313): pid=17744 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14401 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready audit: type=1800 audit(1677777695.335:314): pid=17766 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14760 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready audit: type=1800 audit(1677777696.225:315): pid=17818 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14785 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready print_req_error: 289 callbacks suppressed print_req_error: I/O error, dev loop4, sector 56 print_req_error: I/O error, dev loop4, sector 34 print_req_error: I/O error, dev loop4, sector 105 print_req_error: I/O error, dev loop4, sector 34 buffer_io_error: 250 callbacks suppressed Buffer I/O error on dev loop4p1, logical block 0, async page read print_req_error: I/O error, dev loop4, sector 36 Buffer I/O error on dev loop4p1, logical block 1, async page read print_req_error: I/O error, dev loop4, sector 38 Buffer I/O error on dev loop4p1, logical block 2, async page read print_req_error: I/O error, dev loop4, sector 56 Buffer I/O error on dev loop4p2, logical block 8, async page read print_req_error: I/O error, dev loop4, sector 57 Buffer I/O error on dev loop4p2, logical block 9, async page read print_req_error: I/O error, dev loop4, sector 58 Buffer I/O error on dev loop4p2, logical block 10, async page read audit: type=1800 audit(1677777697.156:316): pid=17874 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14449 res=0 print_req_error: I/O error, dev loop4, sector 59 Buffer I/O error on dev loop4p2, logical block 11, async page read Buffer I/O error on dev loop4p2, logical block 12, async page read Buffer I/O error on dev loop4p2, logical block 13, async page read Buffer I/O error on dev loop4p2, logical block 14, async page read audit: type=1800 audit(1677777697.796:317): pid=17891 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14798 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready audit: type=1800 audit(1677777698.706:318): pid=17941 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14806 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready audit: type=1800 audit(1677777699.566:319): pid=17995 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14811 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready audit: type=1800 audit(1677777700.626:320): pid=18041 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file1" dev="sda1" ino=14769 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready