EXT4-fs (loop5): mounted filesystem without journal. Opts: ,errors=continue ====================================================== WARNING: possible circular locking dependency detected 4.14.307-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.1/10879 is trying to acquire lock: (sb_writers#3){.+.+}, at: [] sb_start_write include/linux/fs.h:1551 [inline] (sb_writers#3){.+.+}, at: [] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 but task is already holding lock: (&ovl_i_mutex_dir_key[depth]#2){++++}, at: [] inode_lock include/linux/fs.h:719 [inline] (&ovl_i_mutex_dir_key[depth]#2){++++}, at: [] vfs_rename+0xbd8/0x1820 fs/namei.c:4472 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: Process accounting resumed -> #2 (&ovl_i_mutex_dir_key[depth]#2){++++}: down_read+0x36/0x80 kernel/locking/rwsem.c:24 inode_lock_shared include/linux/fs.h:729 [inline] lookup_slow+0x129/0x400 fs/namei.c:1674 lookup_one_len_unlocked+0x3a0/0x410 fs/namei.c:2595 ovl_lower_positive+0x184/0x350 fs/overlayfs/namei.c:783 ovl_rename+0x47c/0xe50 fs/overlayfs/dir.c:968 vfs_rename+0x560/0x1820 fs/namei.c:4498 SYSC_renameat2 fs/namei.c:4646 [inline] SyS_renameat2+0x95b/0xad0 fs/namei.c:4535 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 EXT4-fs (loop5): re-mounted. Opts: (null) -> #1 (&oi->lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 ovl_copy_up_start+0x40/0xe0 fs/overlayfs/util.c:318 ovl_copy_up_one+0x21f/0x910 fs/overlayfs/copy_up.c:631 ovl_copy_up_flags+0xd5/0x120 fs/overlayfs/copy_up.c:686 ovl_setattr fs/overlayfs/inode.c:42 [inline] ovl_setattr+0x66/0x500 fs/overlayfs/inode.c:19 notify_change+0x56b/0xd10 fs/attr.c:315 chown_common+0x40b/0x4b0 fs/open.c:631 SYSC_fchownat fs/open.c:661 [inline] SyS_fchownat+0xf6/0x190 fs/open.c:641 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #0 (sb_writers#3){.+.+}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x64/0x260 fs/super.c:1342 sb_start_write include/linux/fs.h:1551 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 ovl_rename+0x11b/0xe50 fs/overlayfs/dir.c:935 vfs_rename+0x560/0x1820 fs/namei.c:4498 SYSC_renameat2 fs/namei.c:4646 [inline] SyS_renameat2+0x95b/0xad0 fs/namei.c:4535 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 other info that might help us debug this: Chain exists of: sb_writers#3 --> &oi->lock --> &ovl_i_mutex_dir_key[depth]#2 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ovl_i_mutex_dir_key[depth]#2); lock(&oi->lock); lock(&ovl_i_mutex_dir_key[depth]#2); lock(sb_writers#3); *** DEADLOCK *** 3 locks held by syz-executor.1/10879: #0: (sb_writers#14){.+.+}, at: [] sb_start_write include/linux/fs.h:1551 [inline] #0: (sb_writers#14){.+.+}, at: [] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 #1: (&ovl_i_mutex_dir_key[depth]#2/1){+.+.}, at: [] inode_lock_nested include/linux/fs.h:754 [inline] #1: (&ovl_i_mutex_dir_key[depth]#2/1){+.+.}, at: [] lock_rename+0x225/0x280 fs/namei.c:2885 #2: (&ovl_i_mutex_dir_key[depth]#2){++++}, at: [] inode_lock include/linux/fs.h:719 [inline] #2: (&ovl_i_mutex_dir_key[depth]#2){++++}, at: [] vfs_rename+0xbd8/0x1820 fs/namei.c:4472 stack backtrace: CPU: 1 PID: 10879 Comm: syz-executor.1 Not tainted 4.14.307-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x64/0x260 fs/super.c:1342 sb_start_write include/linux/fs.h:1551 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 ovl_rename+0x11b/0xe50 fs/overlayfs/dir.c:935 vfs_rename+0x560/0x1820 fs/namei.c:4498 SYSC_renameat2 fs/namei.c:4646 [inline] SyS_renameat2+0x95b/0xad0 fs/namei.c:4535 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7f7c9f5dd0f9 RSP: 002b:00007f7c9db4f168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f7c9f6fcf80 RCX: 00007f7c9f5dd0f9 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000020000100 RBP: 00007f7c9f638ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd607fa0ef R14: 00007f7c9db4f300 R15: 0000000000022000 syz-executor.5 (10870) used greatest stack depth: 25232 bytes left print_req_error: I/O error, dev loop3, sector 0 XFS (loop2): Superblock has unknown read-only compatible features (0x8) enabled. XFS (loop2): Attempted to mount read-only compatible filesystem read-write. XFS (loop2): Filesystem can only be safely mounted read only. XFS (loop2): SB validate failed with error -22. EXT4-fs (loop5): Unrecognized mount option "./file0" or missing value print_req_error: I/O error, dev loop4, sector 0 Buffer I/O error on dev loop4, logical block 0, async page read print_req_error: I/O error, dev loop4, sector 4 Buffer I/O error on dev loop4, logical block 2, async page read print_req_error: I/O error, dev loop4, sector 6 Buffer I/O error on dev loop4, logical block 3, async page read unregister_netdevice: waiting for ip6gre0 to become free. Usage count = -1 EXT4-fs (loop5): mounted filesystem without journal. Opts: ,errors=continue IPVS: sync thread started: state = BACKUP, mcast_ifn = tunl0, syncid = 0, id = 0 IPVS: Unknown mcast interface: dvmrp1 dlm: non-version read from control device 0 EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue Process accounting resumed EXT4-fs (loop3): re-mounted. Opts: (null) caif:caif_disconnect_client(): nothing to disconnect XFS (loop2): Superblock has unknown read-only compatible features (0x8) enabled. XFS (loop2): Attempted to mount read-only compatible filesystem read-write. XFS (loop2): Filesystem can only be safely mounted read only. XFS (loop2): SB validate failed with error -22. audit: type=1800 audit(1678126233.804:9): pid=11299 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="bus" dev="sda1" ino=14161 res=0 EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue Process accounting resumed caif:caif_disconnect_client(): nothing to disconnect EXT4-fs (loop3): re-mounted. Opts: (null) EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue Process accounting resumed EXT4-fs (loop3): re-mounted. Opts: (null) EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue REISERFS (device loop4): found reiserfs format "3.6" with non-standard journal Process accounting resumed REISERFS (device loop4): using ordered data mode reiserfs: using flush barriers EXT4-fs (loop3): re-mounted. Opts: (null) REISERFS (device loop4): journal params: device loop4, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop4): checking transaction log (loop4) REISERFS (device loop4): Using r5 hash to sort names REISERFS (device loop4): Created .reiserfs_priv - reserved for xattr storage. EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue Process accounting resumed EXT4-fs (loop3): re-mounted. Opts: (null) REISERFS (device loop4): found reiserfs format "3.6" with non-standard journal REISERFS (device loop4): using ordered data mode reiserfs: using flush barriers REISERFS (device loop4): journal params: device loop4, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop4): checking transaction log (loop4) REISERFS (device loop4): Using r5 hash to sort names REISERFS (device loop4): Created .reiserfs_priv - reserved for xattr storage. EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue Process accounting resumed EXT4-fs (loop3): re-mounted. Opts: (null) REISERFS (device loop4): found reiserfs format "3.6" with non-standard journal REISERFS (device loop4): using ordered data mode reiserfs: using flush barriers REISERFS (device loop4): journal params: device loop4, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop4): checking transaction log (loop4) REISERFS (device loop4): Using r5 hash to sort names REISERFS (device loop4): Created .reiserfs_priv - reserved for xattr storage. EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop3): re-mounted. Opts: (null) EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop3): re-mounted. Opts: (null) REISERFS (device loop4): found reiserfs format "3.6" with non-standard journal REISERFS (device loop4): using ordered data mode reiserfs: using flush barriers REISERFS (device loop4): journal params: device loop4, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop4): checking transaction log (loop4) REISERFS (device loop4): Using r5 hash to sort names REISERFS (device loop4): Created .reiserfs_priv - reserved for xattr storage. EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop3): re-mounted. Opts: (null) caif:caif_disconnect_client(): nothing to disconnect EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue netlink: 8 bytes leftover after parsing attributes in process `syz-executor.0'. Process accounting resumed EXT4-fs (loop3): re-mounted. Opts: (null) EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue Process accounting resumed EXT4-fs (loop3): re-mounted. Opts: (null) netlink: 20 bytes leftover after parsing attributes in process `syz-executor.4'. EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue Process accounting resumed EXT4-fs (loop3): re-mounted. Opts: (null) netlink: 20 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor.4'. EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue netlink: 20 bytes leftover after parsing attributes in process `syz-executor.4'. REISERFS (device loop5): found reiserfs format "3.6" with non-standard journal REISERFS (device loop5): using ordered data mode reiserfs: using flush barriers Process accounting resumed REISERFS (device loop5): journal params: device loop5, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 EXT4-fs (loop3): re-mounted. Opts: (null) REISERFS (device loop5): checking transaction log (loop5) REISERFS (device loop5): Using r5 hash to sort names REISERFS (device loop5): Created .reiserfs_priv - reserved for xattr storage. EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue Process accounting resumed EXT4-fs (loop3): re-mounted. Opts: (null) caif:caif_disconnect_client(): nothing to disconnect EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue Process accounting resumed EXT4-fs (loop3): re-mounted. Opts: (null) EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue Process accounting resumed EXT4-fs (loop3): re-mounted. Opts: (null) EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue Process accounting resumed EXT4-fs (loop3): re-mounted. Opts: (null)