====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/9977 is trying to acquire lock: 00000000a06650e4 (&ovl_i_mutex_key[depth]#2){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] 00000000a06650e4 (&ovl_i_mutex_key[depth]#2){+.+.}, at: ovl_write_iter+0x148/0xb40 fs/overlayfs/file.c:270 but task is already holding lock: 000000007d170cca (&pipe->mutex/1){+.+.}, at: pipe_lock_nested fs/pipe.c:77 [inline] 000000007d170cca (&pipe->mutex/1){+.+.}, at: pipe_lock fs/pipe.c:85 [inline] 000000007d170cca (&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_setxattr+0x10e/0x170 fs/xattr.c:149 __vfs_setxattr_noperm+0x11a/0x420 fs/xattr.c:180 __vfs_setxattr_locked+0x176/0x250 fs/xattr.c:238 vfs_setxattr+0xe5/0x270 fs/xattr.c:255 setxattr+0x23d/0x330 fs/xattr.c:520 path_setxattr+0x170/0x190 fs/xattr.c:539 __do_sys_lsetxattr fs/xattr.c:561 [inline] __se_sys_lsetxattr fs/xattr.c:557 [inline] __x64_sys_lsetxattr+0xbd/0x150 fs/xattr.c:557 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&ovl_i_mutex_key[depth]#2){+.+.}: 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]#2 --> 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]#2); *** DEADLOCK *** 2 locks held by syz-executor.0/9977: #0: 00000000d7fdbc87 (sb_writers#15){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline] #0: 00000000d7fdbc87 (sb_writers#15){.+.+}, at: do_splice fs/splice.c:1153 [inline] #0: 00000000d7fdbc87 (sb_writers#15){.+.+}, at: __do_sys_splice fs/splice.c:1428 [inline] #0: 00000000d7fdbc87 (sb_writers#15){.+.+}, at: __se_sys_splice+0x11de/0x16d0 fs/splice.c:1408 #1: 000000007d170cca (&pipe->mutex/1){+.+.}, at: pipe_lock_nested fs/pipe.c:77 [inline] #1: 000000007d170cca (&pipe->mutex/1){+.+.}, at: pipe_lock fs/pipe.c:85 [inline] #1: 000000007d170cca (&pipe->mutex/1){+.+.}, at: pipe_wait+0x1bd/0x1e0 fs/pipe.c:133 stack backtrace: CPU: 1 PID: 9977 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/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:0x7f39da4150c9 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:00007f39d8987168 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007f39da534f80 RCX: 00007f39da4150c9 RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f39da470ae9 R08: 000000000000fdef R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcda6b2a5f R14: 00007f39d8987300 R15: 0000000000022000 MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. kauditd_printk_skb: 38 callbacks suppressed audit: type=1800 audit(1674880841.787:632): pid=10026 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14018 res=0 MINIX-fs: bad superblock or unable to read bitmaps MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. audit: type=1800 audit(1674880841.787:633): pid=10026 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14018 res=0 MINIX-fs: bad superblock or unable to read bitmaps audit: type=1800 audit(1674880841.787:634): pid=10026 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14018 res=0 audit: type=1800 audit(1674880841.787:635): pid=10026 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14018 res=0 audit: type=1800 audit(1674880841.787:636): pid=10026 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14018 res=0 audit: type=1800 audit(1674880841.787:637): pid=10026 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14018 res=0 audit: type=1800 audit(1674880841.787:638): pid=10026 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14018 res=0 audit: type=1800 audit(1674880841.787:639): pid=10026 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14018 res=0 audit: type=1800 audit(1674880841.787:640): pid=10026 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14018 res=0 audit: type=1800 audit(1674880841.787:641): pid=10026 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14018 res=0 netlink: 240 bytes leftover after parsing attributes in process `syz-executor.2'. MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. MINIX-fs: bad superblock or unable to read bitmaps netlink: 240 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 240 bytes leftover after parsing attributes in process `syz-executor.2'. MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. MINIX-fs: bad superblock or unable to read bitmaps IPVS: ftp: loaded support on port[0] = 21 overlayfs: at least 2 lowerdir are needed while upperdir nonexistent overlayfs: at least 2 lowerdir are needed while upperdir nonexistent IPVS: ftp: loaded support on port[0] = 21 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.2'. MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. overlayfs: at least 2 lowerdir are needed while upperdir nonexistent netlink: 72 bytes leftover after parsing attributes in process `syz-executor.4'. MINIX-fs: bad superblock or unable to read bitmaps netlink: 72 bytes leftover after parsing attributes in process `syz-executor.4'. MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. MINIX-fs: bad superblock or unable to read bitmaps netlink: 72 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 72 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 72 bytes leftover after parsing attributes in process `syz-executor.2'. MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. netlink: 72 bytes leftover after parsing attributes in process `syz-executor.2'. MINIX-fs: bad superblock or unable to read bitmaps MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. MINIX-fs: bad superblock or unable to read bitmaps kauditd_printk_skb: 66 callbacks suppressed audit: type=1800 audit(1674880846.808:708): pid=10539 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14780 res=0 IPVS: ftp: loaded support on port[0] = 21 audit: type=1800 audit(1674880846.838:709): pid=10539 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14780 res=0 audit: type=1800 audit(1674880846.838:710): pid=10539 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14780 res=0 audit: type=1800 audit(1674880846.838:711): pid=10539 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14780 res=0 audit: type=1800 audit(1674880846.838:712): pid=10539 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14780 res=0 audit: type=1800 audit(1674880846.838:713): pid=10539 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14780 res=0 audit: type=1800 audit(1674880846.838:714): pid=10539 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14780 res=0 audit: type=1800 audit(1674880846.838:715): pid=10539 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14780 res=0 audit: type=1800 audit(1674880846.838:716): pid=10539 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14780 res=0 audit: type=1800 audit(1674880846.838:717): pid=10539 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14780 res=0 MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. IPVS: ftp: loaded support on port[0] = 21 MINIX-fs: bad superblock or unable to read bitmaps MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. MINIX-fs: bad superblock or unable to read bitmaps device lo entered promiscuous mode MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. MINIX-fs: bad superblock or unable to read bitmaps overlayfs: unrecognized mount option "01777777777777777777777" or missing value device lo left promiscuous mode device lo entered promiscuous mode netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. xt_check_table_hooks: 57 callbacks suppressed x_tables: duplicate underflow at hook 1 MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. MINIX-fs: bad superblock or unable to read bitmaps device lo left promiscuous mode device lo entered promiscuous mode tpacket_rcv: packet too big, clamped from 62197 to 32628. macoff=92 x_tables: duplicate underflow at hook 1 MINIX-fs: file system does not have enough zmap blocks allocated. Refusing to mount. MINIX-fs: bad superblock or unable to read bitmaps x_tables: duplicate underflow at hook 1