============================================ WARNING: possible recursive locking detected 4.19.211-syzkaller #0 Not tainted -------------------------------------------- syz-executor.3/11431 is trying to acquire lock: 00000000e7cb79cf (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_get_block+0x292/0x960 fs/hfsplus/extents.c:260 but task is already holding lock: 0000000085b2d456 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_extend+0x1bb/0xf40 fs/hfsplus/extents.c:457 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&HFSPLUS_I(inode)->extents_lock); lock(&HFSPLUS_I(inode)->extents_lock); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by syz-executor.3/11431: #0: 00000000feb544eb (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767 #1: 000000004e23d894 (sb_writers#29){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline] #1: 000000004e23d894 (sb_writers#29){.+.+}, at: vfs_write+0x463/0x540 fs/read_write.c:548 #2: 00000000d0eddab8 (&sb->s_type->i_mutex_key#37){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #2: 00000000d0eddab8 (&sb->s_type->i_mutex_key#37){+.+.}, at: generic_file_write_iter+0x99/0x730 mm/filemap.c:3320 #3: 0000000085b2d456 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_extend+0x1bb/0xf40 fs/hfsplus/extents.c:457 #4: 00000000e262742c (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_allocate+0xe0/0xa60 fs/hfsplus/bitmap.c:35 stack backtrace: CPU: 1 PID: 11431 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:1764 [inline] check_deadlock kernel/locking/lockdep.c:1808 [inline] validate_chain kernel/locking/lockdep.c:2404 [inline] __lock_acquire.cold+0x121/0x57e 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_get_block+0x292/0x960 fs/hfsplus/extents.c:260 block_read_full_page+0x288/0xd10 fs/buffer.c:2259 do_read_cache_page+0x533/0x1170 mm/filemap.c:2828 read_mapping_page include/linux/pagemap.h:402 [inline] hfsplus_block_allocate+0x197/0xa60 fs/hfsplus/bitmap.c:37 hfsplus_file_extend+0x436/0xf40 fs/hfsplus/extents.c:468 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 RIP: 0033:0x7f0841fb20f9 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:00007f0840524168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f08420d1f80 RCX: 00007f0841fb20f9 RDX: 0000000000000007 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007f084200dae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdd7001ccf R14: 00007f0840524300 R15: 0000000000022000 kauditd_printk_skb: 219 callbacks suppressed audit: type=1800 audit(1678032492.966:2913): pid=11428 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.2" name="bus" dev="sda1" ino=14665 res=0 IPVS: ftp: loaded support on port[0] = 21 audit: type=1800 audit(1678032493.636:2914): pid=11521 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="sda1" ino=14759 res=0 audit: type=1800 audit(1678032493.696:2915): pid=11526 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="loop3" ino=25 res=0 audit: type=1800 audit(1678032493.706:2916): pid=11528 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.2" name="bus" dev="sda1" ino=14762 res=0 audit: type=1800 audit(1678032493.716:2917): pid=11562 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=14763 res=0 audit: type=1804 audit(1678032493.716:2918): pid=11561 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir619008449/syzkaller.pp1SF2/1072/file0" dev="sda1" ino=14763 res=1 audit: type=1804 audit(1678032493.776:2919): pid=11571 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir619008449/syzkaller.pp1SF2/1072/file0" dev="sda1" ino=14763 res=1 audit: type=1804 audit(1678032493.776:2920): pid=11572 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir619008449/syzkaller.pp1SF2/1072/file0" dev="sda1" ino=14763 res=1 audit: type=1800 audit(1678032494.006:2921): pid=11603 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14759 res=0 audit: type=1800 audit(1678032494.036:2922): pid=11597 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 kauditd_printk_skb: 35 callbacks suppressed audit: type=1800 audit(1678032498.106:2958): pid=11788 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=14744 res=0 audit: type=1804 audit(1678032498.196:2959): pid=11788 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.0" name="/root/syzkaller-testdir2657615369/syzkaller.5exPKW/1153/file0" dev="sda1" ino=14744 res=1 audit: type=1804 audit(1678032498.496:2960): pid=11786 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.0" name="/root/syzkaller-testdir2657615369/syzkaller.5exPKW/1153/file0" dev="sda1" ino=14744 res=1 audit: type=1800 audit(1678032498.566:2961): pid=11797 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14666 res=0 audit: type=1800 audit(1678032498.676:2962): pid=11805 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=14783 res=0 audit: type=1804 audit(1678032498.756:2963): pid=11805 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir619008449/syzkaller.pp1SF2/1076/file0" dev="sda1" ino=14783 res=1 audit: type=1804 audit(1678032499.076:2964): pid=11804 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir619008449/syzkaller.pp1SF2/1076/file0" dev="sda1" ino=14783 res=1 audit: type=1800 audit(1678032499.246:2965): pid=11817 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=14747 res=0 audit: type=1804 audit(1678032499.346:2966): pid=11817 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.0" name="/root/syzkaller-testdir2657615369/syzkaller.5exPKW/1154/file0" dev="sda1" ino=14747 res=1 audit: type=1804 audit(1678032499.656:2967): pid=11818 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.0" name="/root/syzkaller-testdir2657615369/syzkaller.5exPKW/1154/file0" dev="sda1" ino=14747 res=1