IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 ====================================================== WARNING: possible circular locking dependency detected 4.19.0-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/5038 is trying to acquire lock: 00000000bc6c3f9d (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_free+0x57/0x1f7 fs/hfsplus/bitmap.c:182 but task is already holding lock: 00000000b82b827a (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x87/0x39a fs/hfsplus/extents.c:570 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0x5d/0x750 kernel/locking/mutex.c:1072 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 hfsplus_get_block+0xeb/0x230 fs/hfsplus/extents.c:254 block_read_full_page+0x100/0x3d0 fs/buffer.c:2247 hfsplus_readpage+0x13/0x20 fs/hfsplus/inode.c:27 do_read_cache_page.part.6+0x214/0x450 mm/filemap.c:2805 do_read_cache_page mm/filemap.c:2892 [inline] read_cache_page+0x10/0x20 mm/filemap.c:2893 read_mapping_page include/linux/pagemap.h:402 [inline] hfsplus_block_allocate+0x7e/0x3c0 fs/hfsplus/bitmap.c:37 hfsplus_file_extend+0xd5/0x330 fs/hfsplus/extents.c:462 hfsplus_get_block+0x63/0x230 fs/hfsplus/extents.c:239 __block_write_begin_int+0x168/0x5a0 fs/buffer.c:1966 __block_write_begin fs/buffer.c:2016 [inline] block_write_begin+0x48/0x100 fs/buffer.c:2075 cont_write_begin+0x1ce/0x2c0 fs/buffer.c:2428 hfsplus_write_begin+0x35/0x70 fs/hfsplus/inode.c:52 pagecache_write_begin+0x11/0x20 mm/filemap.c:2983 __page_symlink+0xb4/0x100 fs/namei.c:4832 page_symlink+0x1c/0x20 fs/namei.c:4855 hfsplus_symlink+0x69/0x130 fs/hfsplus/dir.c:449 vfs_symlink+0xe6/0x170 fs/namei.c:4127 do_symlinkat+0xdd/0xf0 fs/namei.c:4154 __do_sys_symlink fs/namei.c:4173 [inline] __se_sys_symlink fs/namei.c:4171 [inline] __x64_sys_symlink+0x16/0x20 fs/namei.c:4171 do_syscall_64+0x68/0x1b0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&sbi->alloc_mutex){+.+.}: lock_acquire+0xc0/0x190 kernel/locking/lockdep.c:3900 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0x5d/0x750 kernel/locking/mutex.c:1072 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 hfsplus_block_free+0x57/0x1f7 fs/hfsplus/bitmap.c:182 hfsplus_free_extents+0x76/0xe0 fs/hfsplus/extents.c:357 hfsplus_file_truncate+0x254/0x39a fs/hfsplus/extents.c:585 hfsplus_delete_inode+0x56/0x70 fs/hfsplus/inode.c:418 hfsplus_unlink+0x193/0x1d0 fs/hfsplus/dir.c:405 hfsplus_rename+0x88/0x90 fs/hfsplus/dir.c:545 vfs_rename+0x4ac/0x930 fs/namei.c:4477 do_renameat2+0x416/0x5c0 fs/namei.c:4627 __do_sys_renameat2 fs/namei.c:4662 [inline] __se_sys_renameat2 fs/namei.c:4659 [inline] __x64_sys_renameat2+0x1f/0x30 fs/namei.c:4659 do_syscall_64+0x68/0x1b0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&HFSPLUS_I(inode)->extents_lock); lock(&sbi->alloc_mutex); lock(&HFSPLUS_I(inode)->extents_lock); lock(&sbi->alloc_mutex); *** DEADLOCK *** 6 locks held by syz-executor.2/5038: #0: 00000000fc7c8df1 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1566 [inline] #0: 00000000fc7c8df1 (sb_writers#14){.+.+}, at: mnt_want_write+0x1f/0x50 fs/namespace.c:360 #1: 00000000a68ad8fc (&type->i_mutex_dir_key#8/1){+.+.}, at: inode_lock_nested include/linux/fs.h:773 [inline] #1: 00000000a68ad8fc (&type->i_mutex_dir_key#8/1){+.+.}, at: lock_rename+0xfa/0x100 fs/namei.c:2862 #2: 00000000ba440c7f (&sb->s_type->i_mutex_key#20){+.+.}, at: inode_lock include/linux/fs.h:738 [inline] #2: 00000000ba440c7f (&sb->s_type->i_mutex_key#20){+.+.}, at: lock_two_nondirectories+0x66/0x70 fs/inode.c:1007 #3: 00000000bac6ed35 (&sb->s_type->i_mutex_key#20/4){+.+.}, at: inode_lock_nested include/linux/fs.h:773 [inline] #3: 00000000bac6ed35 (&sb->s_type->i_mutex_key#20/4){+.+.}, at: lock_two_nondirectories+0x54/0x70 fs/inode.c:1009 #4: 00000000c11ffe07 (&sbi->vh_mutex){+.+.}, at: hfsplus_unlink+0x5b/0x1d0 fs/hfsplus/dir.c:370 #5: 00000000b82b827a (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x87/0x39a fs/hfsplus/extents.c:570 stack backtrace: CPU: 1 PID: 5038 Comm: syz-executor.2 Not tainted 4.19.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xc4/0x11a lib/dump_stack.c:113 print_circular_bug.isra.18.cold.35+0x173/0x1cd kernel/locking/lockdep.c:1221 check_prev_add kernel/locking/lockdep.c:1861 [inline] check_prevs_add kernel/locking/lockdep.c:1974 [inline] validate_chain kernel/locking/lockdep.c:2415 [inline] __lock_acquire+0x11bb/0x12f0 kernel/locking/lockdep.c:3411 lock_acquire+0xc0/0x190 kernel/locking/lockdep.c:3900 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0x5d/0x750 kernel/locking/mutex.c:1072 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 hfsplus_block_free+0x57/0x1f7 fs/hfsplus/bitmap.c:182 hfsplus_free_extents+0x76/0xe0 fs/hfsplus/extents.c:357 hfsplus_file_truncate+0x254/0x39a fs/hfsplus/extents.c:585 hfsplus_delete_inode+0x56/0x70 fs/hfsplus/inode.c:418 hfsplus_unlink+0x193/0x1d0 fs/hfsplus/dir.c:405 hfsplus_rename+0x88/0x90 fs/hfsplus/dir.c:545 vfs_rename+0x4ac/0x930 fs/namei.c:4477 do_renameat2+0x416/0x5c0 fs/namei.c:4627 __do_sys_renameat2 fs/namei.c:4662 [inline] __se_sys_renameat2 fs/namei.c:4659 [inline] __x64_sys_renameat2+0x1f/0x30 fs/namei.c:4659 do_syscall_64+0x68/0x1b0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f27ff538da9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f27ff0bb0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007f27ff667f80 RCX: 00007f27ff538da9 RDX: 0000000000000004 RSI: 00000000200000c0 RDI: 0000000000000005 RBP: 00007f27ff58547a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000180 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000016 R14: 00007f27ff667f80 R15: 00007ffe3864aad8