REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): using ordered data mode reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.3/26330 is trying to acquire lock: 00000000d826eb25 (&tree->tree_lock/1){+.+.}, at: hfsplus_find_init+0x170/0x220 fs/hfsplus/bfind.c:33 but task is already holding lock: 00000000c2aa71dc (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 fs/hfsplus/extents.c:576 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}: REISERFS (device loop1): checking transaction log (loop1) hfsplus_file_extend+0x1bb/0xf40 fs/hfsplus/extents.c:457 hfsplus_bmap_reserve+0x298/0x440 fs/hfsplus/btree.c:357 __hfsplus_ext_write_extent+0x45b/0x5a0 fs/hfsplus/extents.c:104 __hfsplus_ext_cache_extent fs/hfsplus/extents.c:186 [inline] hfsplus_ext_read_extent+0x910/0xab0 fs/hfsplus/extents.c:218 hfsplus_file_extend+0x672/0xf40 fs/hfsplus/extents.c:461 hfsplus_get_block+0x196/0x960 fs/hfsplus/extents.c:245 __block_write_begin_int+0x46c/0x17b0 fs/buffer.c:1978 __block_write_begin fs/buffer.c:2028 [inline] block_write_begin+0x58/0x2e0 fs/buffer.c:2087 cont_write_begin+0x55a/0x820 fs/buffer.c:2440 hfsplus_write_begin+0x87/0x150 fs/hfsplus/inode.c:52 generic_perform_write+0x1f8/0x4d0 mm/filemap.c:3170 __generic_file_write_iter+0x24b/0x610 mm/filemap.c:3295 generic_file_write_iter+0x3f8/0x730 mm/filemap.c:3323 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 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&tree->tree_lock/1){+.+.}: __mutex_lock_common kernel/locking/mutex.c:937 [inline] __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078 hfsplus_find_init+0x170/0x220 fs/hfsplus/bfind.c:33 hfsplus_file_truncate+0x297/0x1040 fs/hfsplus/extents.c:582 hfsplus_delete_inode+0x18d/0x220 fs/hfsplus/inode.c:419 hfsplus_unlink+0x595/0x820 fs/hfsplus/dir.c:405 hfsplus_rename+0xbe/0x200 fs/hfsplus/dir.c:545 vfs_rename+0x67e/0x1bc0 fs/namei.c:4479 do_renameat2+0xb59/0xc70 fs/namei.c:4629 __do_sys_rename fs/namei.c:4675 [inline] __se_sys_rename fs/namei.c:4673 [inline] __x64_sys_rename+0x5d/0x80 fs/namei.c:4673 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: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- REISERFS (device loop1): Using r5 hash to sort names lock(&HFSPLUS_I(inode)->extents_lock); lock(&tree->tree_lock/1); REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. lock(&HFSPLUS_I(inode)->extents_lock); lock(&tree->tree_lock/1); *** DEADLOCK *** 8 locks held by syz-executor.3/26330: #0: 00000000007bbca1 (sb_writers#20){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000007bbca1 (sb_writers#20){.+.+}, at: mnt_want_write+0x3a/0xb0 fs/namespace.c:360 #1: 000000001563d1ce (&type->s_vfs_rename_key#5){+.+.}, at: lock_rename+0x54/0x280 fs/namei.c:2867 #2: 000000009ff1e578 (&type->i_mutex_dir_key#10/1){+.+.}, at: inode_lock_nested include/linux/fs.h:783 [inline] #2: 000000009ff1e578 (&type->i_mutex_dir_key#10/1){+.+.}, at: lock_rename+0xa0/0x280 fs/namei.c:2871 #3: 00000000fffa19e5 (&type->i_mutex_dir_key#10/2){+.+.}, at: inode_lock_nested include/linux/fs.h:783 [inline] #3: 00000000fffa19e5 (&type->i_mutex_dir_key#10/2){+.+.}, at: lock_rename+0xd4/0x280 fs/namei.c:2872 #4: 000000003d286a24 (&sb->s_type->i_mutex_key#24){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #4: 000000003d286a24 (&sb->s_type->i_mutex_key#24){+.+.}, at: lock_two_nondirectories+0xec/0x110 fs/inode.c:1015 #5: 00000000617e95cc (&sb->s_type->i_mutex_key#24/4){+.+.}, at: inode_lock_nested include/linux/fs.h:783 [inline] #5: 00000000617e95cc (&sb->s_type->i_mutex_key#24/4){+.+.}, at: lock_two_nondirectories+0xd1/0x110 fs/inode.c:1017 #6: 00000000f181b91a (&sbi->vh_mutex){+.+.}, at: hfsplus_unlink+0x140/0x820 fs/hfsplus/dir.c:370 #7: 00000000c2aa71dc (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 fs/hfsplus/extents.c:576 stack backtrace: CPU: 0 PID: 26330 Comm: syz-executor.3 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 hfsplus_find_init+0x170/0x220 fs/hfsplus/bfind.c:33 hfsplus_file_truncate+0x297/0x1040 fs/hfsplus/extents.c:582 hfsplus_delete_inode+0x18d/0x220 fs/hfsplus/inode.c:419 hfsplus_unlink+0x595/0x820 fs/hfsplus/dir.c:405 hfsplus_rename+0xbe/0x200 fs/hfsplus/dir.c:545 vfs_rename+0x67e/0x1bc0 fs/namei.c:4479 do_renameat2+0xb59/0xc70 fs/namei.c:4629 __do_sys_rename fs/namei.c:4675 [inline] __se_sys_rename fs/namei.c:4673 [inline] __x64_sys_rename+0x5d/0x80 fs/namei.c:4673 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7ff27508f0a9 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:00007ff273601168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007ff2751aef80 RCX: 00007ff27508f0a9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000020000000 RBP: 00007ff2750eaae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc531778bf R14: 00007ff273601300 R15: 0000000000022000 BTRFS info (device loop2): enabling inode map caching BTRFS warning (device loop2): excessive commit interval 622039222 BTRFS info (device loop2): force zlib compression, level 3 BTRFS info (device loop2): using free space tree BTRFS info (device loop2): has skinny extents audit: type=1800 audit(1672390220.933:451): pid=26353 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed comm="syz-executor.3" name="file1" dev="loop3" ino=20 res=0 hfsplus: inconsistency in B*Tree (2,0,1,0,1) hfsplus: inconsistency in B*Tree (2,0,1,0,1) REISERFS warning (device loop1): super-6502 reiserfs_getopt: unknown mount option "" hfsplus: unable to parse mount options REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): using ordered data mode REISERFS (device loop3): using ordered data mode reiserfs: using flush barriers reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. BTRFS info (device loop2): enabling inode map caching REISERFS (device loop1): Using r5 hash to sort names BTRFS warning (device loop2): excessive commit interval 622039222 REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. BTRFS info (device loop2): force zlib compression, level 3 BTRFS info (device loop2): using free space tree BTRFS info (device loop2): has skinny extents REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop3): using ordered data mode reiserfs: using flush barriers REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. BTRFS info (device loop2): enabling inode map caching BTRFS warning (device loop2): excessive commit interval 622039222 BTRFS info (device loop2): force zlib compression, level 3 BTRFS info (device loop2): using free space tree BTRFS info (device loop2): has skinny extents REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop3): using ordered data mode reiserfs: using flush barriers REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) kauditd_printk_skb: 6 callbacks suppressed audit: type=1800 audit(1672390223.293:458): pid=26557 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="bus" dev="sda1" ino=13918 res=0 REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. audit: type=1800 audit(1672390223.383:459): pid=26570 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="bus" dev="sda1" ino=13932 res=0 audit: type=1804 audit(1672390223.433:460): pid=26627 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1840460170/syzkaller.TYq2Sm/246/bus" dev="sda1" ino=13918 res=1 audit: type=1804 audit(1672390223.523:461): pid=26570 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir2368103776/syzkaller.kGtEgg/284/bus" dev="sda1" ino=13932 res=1 audit: type=1804 audit(1672390223.553:462): pid=26557 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.5" name="/root/syzkaller-testdir1840460170/syzkaller.TYq2Sm/246/bus" dev="sda1" ino=13918 res=1 audit: type=1804 audit(1672390223.723:463): pid=26570 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.4" name="/root/syzkaller-testdir2368103776/syzkaller.kGtEgg/284/bus" dev="sda1" ino=13932 res=1 IPVS: ftp: loaded support on port[0] = 21 REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop3): using ordered data mode reiserfs: using flush barriers REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. audit: type=1800 audit(1672390224.623:464): pid=26653 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="bus" dev="sda1" ino=13888 res=0 audit: type=1804 audit(1672390224.703:465): pid=26653 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir2368103776/syzkaller.kGtEgg/285/bus" dev="sda1" ino=13888 res=1 audit: type=1804 audit(1672390224.763:466): pid=26687 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.4" name="/root/syzkaller-testdir2368103776/syzkaller.kGtEgg/285/bus" dev="sda1" ino=13888 res=1 REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): using ordered data mode reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop3): using ordered data mode reiserfs: using flush barriers REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) REISERFS (device loop1): Using r5 hash to sort names REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. IPVS: ftp: loaded support on port[0] = 21 REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): using ordered data mode reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop3): using ordered data mode reiserfs: using flush barriers REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. REISERFS (device loop1): Using r5 hash to sort names REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. IPVS: ftp: loaded support on port[0] = 21 sp0: Synchronizing with TNC REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop3): using ordered data mode reiserfs: using flush barriers REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): using ordered data mode REISERFS (device loop3): checking transaction log (loop3) reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop1): Using r5 hash to sort names REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. device vxlan0 entered promiscuous mode REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop3): using ordered data mode REISERFS (device loop1): using ordered data mode reiserfs: using flush barriers reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): Using r5 hash to sort names REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. REISERFS (device loop3): checking transaction log (loop3) REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. caif:caif_disconnect_client(): nothing to disconnect REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): using ordered data mode device vxlan0 entered promiscuous mode reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): Using r5 hash to sort names REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. REISERFS (device loop3): using ordered data mode reiserfs: using flush barriers REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. device vxlan0 entered promiscuous mode caif:caif_disconnect_client(): nothing to disconnect REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): using ordered data mode reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): Using r5 hash to sort names REISERFS (device loop3): using ordered data mode REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. reiserfs: using flush barriers REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) caif:caif_disconnect_client(): nothing to disconnect device vxlan0 entered promiscuous mode REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): using ordered data mode reiserfs: using flush barriers