exfat: Deprecated parameter 'namecase' exfat: Deprecated parameter 'utf8' exFAT-fs (loop1): failed to load upcase table (idx : 0x00010000, chksum : 0x207d53fc, utbl_chksum : 0xe619d30d) ====================================================== WARNING: possible circular locking dependency detected 6.3.0-rc3-syzkaller-00317-g65aca32efdcb #0 Not tainted ------------------------------------------------------ syz-executor.1/29519 is trying to acquire lock: ffff88804e82c690 (mapping.invalidate_lock#9){.+.+}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:813 [inline] ffff88804e82c690 (mapping.invalidate_lock#9){.+.+}-{3:3}, at: filemap_fault+0xb99/0x2450 mm/filemap.c:3274 but task is already holding lock: ffff88807d70e498 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] ffff88807d70e498 (&mm->mmap_lock){++++}-{3:3}, at: do_user_addr_fault+0x276/0x1230 arch/x86/mm/fault.c:1348 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&mm->mmap_lock){++++}-{3:3}: down_read+0x3d/0x50 kernel/locking/rwsem.c:1520 mmap_read_lock include/linux/mmap_lock.h:117 [inline] do_user_addr_fault+0xa51/0x1230 arch/x86/mm/fault.c:1358 handle_page_fault arch/x86/mm/fault.c:1498 [inline] exc_page_fault+0x98/0x170 arch/x86/mm/fault.c:1554 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 filldir+0x1ec/0x680 fs/readdir.c:253 dir_emit_dot include/linux/fs.h:3144 [inline] dir_emit_dots include/linux/fs.h:3155 [inline] exfat_iterate+0x56b/0xb40 fs/exfat/dir.c:235 iterate_dir+0x1fd/0x6f0 fs/readdir.c:67 __do_sys_getdents fs/readdir.c:286 [inline] __se_sys_getdents fs/readdir.c:271 [inline] __x64_sys_getdents+0x13e/0x2c0 fs/readdir.c:271 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #1 (&sbi->s_lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x12f/0x1350 kernel/locking/mutex.c:747 exfat_get_block+0x18d/0x16e0 fs/exfat/inode.c:280 do_mpage_readpage+0x768/0x1960 fs/mpage.c:208 mpage_readahead+0x344/0x580 fs/mpage.c:356 read_pages+0x1a2/0xd40 mm/readahead.c:161 page_cache_ra_unbounded+0x477/0x5e0 mm/readahead.c:270 do_page_cache_ra mm/readahead.c:300 [inline] page_cache_ra_order+0x6ec/0xa00 mm/readahead.c:560 ondemand_readahead+0x6b3/0x1080 mm/readahead.c:682 page_cache_sync_ra+0x1c9/0x200 mm/readahead.c:709 page_cache_sync_readahead include/linux/pagemap.h:1214 [inline] filemap_get_pages+0x28d/0x1620 mm/filemap.c:2598 filemap_read+0x35e/0xc70 mm/filemap.c:2693 generic_file_read_iter+0x3ad/0x5b0 mm/filemap.c:2840 __kernel_read+0x2ca/0x830 fs/read_write.c:428 integrity_kernel_read+0x7f/0xb0 security/integrity/iint.c:199 ima_calc_file_hash_tfm+0x2aa/0x3b0 security/integrity/ima/ima_crypto.c:485 ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0x195/0x4a0 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x55b/0x670 security/integrity/ima/ima_api.c:293 process_measurement+0xd2f/0x1930 security/integrity/ima/ima_main.c:341 ima_file_check+0xba/0x100 security/integrity/ima/ima_main.c:539 do_open fs/namei.c:3562 [inline] path_openat+0x15d3/0x2750 fs/namei.c:3715 do_filp_open+0x1ba/0x410 fs/namei.c:3742 do_sys_openat2+0x16d/0x4c0 fs/open.c:1348 do_sys_open fs/open.c:1364 [inline] __do_sys_open fs/open.c:1372 [inline] __se_sys_open fs/open.c:1368 [inline] __x64_sys_open+0x11d/0x1c0 fs/open.c:1368 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (mapping.invalidate_lock#9){.+.+}-{3:3}: check_prev_add kernel/locking/lockdep.c:3098 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain kernel/locking/lockdep.c:3832 [inline] __lock_acquire+0x2ec7/0x5d40 kernel/locking/lockdep.c:5056 lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 down_read+0x3d/0x50 kernel/locking/rwsem.c:1520 filemap_invalidate_lock_shared include/linux/fs.h:813 [inline] filemap_fault+0xb99/0x2450 mm/filemap.c:3274 __do_fault+0x107/0x600 mm/memory.c:4141 do_read_fault mm/memory.c:4492 [inline] do_fault mm/memory.c:4621 [inline] handle_pte_fault mm/memory.c:4909 [inline] __handle_mm_fault+0x24f3/0x3e60 mm/memory.c:5051 handle_mm_fault+0x2ba/0x9c0 mm/memory.c:5197 do_user_addr_fault+0x475/0x1230 arch/x86/mm/fault.c:1407 handle_page_fault arch/x86/mm/fault.c:1498 [inline] exc_page_fault+0x98/0x170 arch/x86/mm/fault.c:1554 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 do_strncpy_from_user lib/strncpy_from_user.c:41 [inline] strncpy_from_user+0x1c1/0x3c0 lib/strncpy_from_user.c:139 getname_flags.part.0+0x95/0x4f0 fs/namei.c:151 getname_flags include/linux/audit.h:321 [inline] getname+0x92/0xd0 fs/namei.c:219 do_sys_openat2+0xf5/0x4c0 fs/open.c:1342 do_sys_open fs/open.c:1364 [inline] __do_sys_openat fs/open.c:1380 [inline] __se_sys_openat fs/open.c:1375 [inline] __x64_sys_openat+0x143/0x1f0 fs/open.c:1375 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Chain exists of: mapping.invalidate_lock#9 --> &sbi->s_lock --> &mm->mmap_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_lock); lock(&sbi->s_lock); lock(&mm->mmap_lock); lock(mapping.invalidate_lock#9); *** DEADLOCK *** 1 lock held by syz-executor.1/29519: #0: ffff88807d70e498 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #0: ffff88807d70e498 (&mm->mmap_lock){++++}-{3:3}, at: do_user_addr_fault+0x276/0x1230 arch/x86/mm/fault.c:1348 stack backtrace: CPU: 1 PID: 29519 Comm: syz-executor.1 Not tainted 6.3.0-rc3-syzkaller-00317-g65aca32efdcb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3098 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain kernel/locking/lockdep.c:3832 [inline] __lock_acquire+0x2ec7/0x5d40 kernel/locking/lockdep.c:5056 lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 down_read+0x3d/0x50 kernel/locking/rwsem.c:1520 filemap_invalidate_lock_shared include/linux/fs.h:813 [inline] filemap_fault+0xb99/0x2450 mm/filemap.c:3274 __do_fault+0x107/0x600 mm/memory.c:4141 do_read_fault mm/memory.c:4492 [inline] do_fault mm/memory.c:4621 [inline] handle_pte_fault mm/memory.c:4909 [inline] __handle_mm_fault+0x24f3/0x3e60 mm/memory.c:5051 handle_mm_fault+0x2ba/0x9c0 mm/memory.c:5197 do_user_addr_fault+0x475/0x1230 arch/x86/mm/fault.c:1407 handle_page_fault arch/x86/mm/fault.c:1498 [inline] exc_page_fault+0x98/0x170 arch/x86/mm/fault.c:1554 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 RIP: 0010:do_strncpy_from_user lib/strncpy_from_user.c:41 [inline] RIP: 0010:strncpy_from_user+0x1c1/0x3c0 lib/strncpy_from_user.c:139 Code: ed 08 4d 89 74 1d 00 bf 07 00 00 00 48 83 c3 08 48 89 ee e8 81 61 44 fd 48 83 fd 07 0f 86 c0 01 00 00 e8 02 65 44 fd 45 31 ff <49> 8b 04 1c 31 ff 44 89 fe 49 89 c6 e8 3e 61 44 fd 45 85 ff 0f 84 RSP: 0018:ffffc9000397fd08 EFLAGS: 00050246 RAX: 0000000000000090 RBX: 0000000000000000 RCX: ffffc90004832000 RDX: 0000000000040000 RSI: ffffffff843da0ae RDI: 0000000000000007 RBP: 0000000000000fe0 R08: 0000000000000007 R09: 0000000000000007 R10: 0000000000000fe0 R11: 0000000000000000 R12: 0000000020000040 R13: ffff888046fdc660 R14: ffff888046fdc660 R15: 0000000000000000 getname_flags.part.0+0x95/0x4f0 fs/namei.c:151 getname_flags include/linux/audit.h:321 [inline] getname+0x92/0xd0 fs/namei.c:219 do_sys_openat2+0xf5/0x4c0 fs/open.c:1342 do_sys_open fs/open.c:1364 [inline] __do_sys_openat fs/open.c:1380 [inline] __se_sys_openat fs/open.c:1375 [inline] __x64_sys_openat+0x143/0x1f0 fs/open.c:1375 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f0b2408c0f9 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:00007f0b24d53168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f0b241abf80 RCX: 00007f0b2408c0f9 RDX: 0000000000000000 RSI: 0000000020000040 RDI: ffffffffffffff9c RBP: 00007f0b240e7b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff350daaff R14: 00007f0b24d53300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: ed in (%dx),%eax 1: 08 4d 89 or %cl,-0x77(%rbp) 4: 74 1d je 0x23 6: 00 bf 07 00 00 00 add %bh,0x7(%rdi) c: 48 83 c3 08 add $0x8,%rbx 10: 48 89 ee mov %rbp,%rsi 13: e8 81 61 44 fd callq 0xfd446199 18: 48 83 fd 07 cmp $0x7,%rbp 1c: 0f 86 c0 01 00 00 jbe 0x1e2 22: e8 02 65 44 fd callq 0xfd446529 27: 45 31 ff xor %r15d,%r15d * 2a: 49 8b 04 1c mov (%r12,%rbx,1),%rax <-- trapping instruction 2e: 31 ff xor %edi,%edi 30: 44 89 fe mov %r15d,%esi 33: 49 89 c6 mov %rax,%r14 36: e8 3e 61 44 fd callq 0xfd446179 3b: 45 85 ff test %r15d,%r15d 3e: 0f .byte 0xf 3f: 84 .byte 0x84