Kernel bug: kernel BUG in link_path_walk
Subsystem: exfat, ocfs2
Status: open

Crash report:
(syz.0.44,5738,0):ocfs2_find_entry_id:420 ERROR: status = -30
VFS_BUG_ON_INODE(!S_ISDIR(inode->i_mode)) encountered for inode ffff888045864178
fs ocfs2 mode 100000 opflags 0x2 flags 0x20 state 0x0 count 2
------------[ cut here ]------------
kernel BUG at fs/namei.c:630!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5738 Comm: syz.0.44 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:lookup_inode_permission_may_exec fs/namei.c:630 [inline]
RIP: 0010:may_lookup fs/namei.c:1900 [inline]
RIP: 0010:link_path_walk+0x18cb/0x18d0 fs/namei.c:2537
Code: e8 ba 78 e9 fe 90 0f 0b e8 82 41 82 ff 44 89 fd e9 6a fd ff ff e8 75 41 82 ff 48 89 ef 48 c7 c6 80 e8 79 8b e8 96 78 e9 fe 90 <0f> 0b 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 55
RSP: 0018:ffffc900035a78a0 EFLAGS: 00010282
RAX: 000000000000008e RBX: ffffc900035a7c58 RCX: 9c94389a78a54b00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffff888045864178 R08: ffffc900035a75c7 R09: 1ffff920006b4eb8
R10: dffffc0000000000 R11: fffff520006b4eb9 R12: 0000000000008000
R13: ffffc900035a7c20 R14: 0000000000008000 R15: ffff88803e713320
FS:  000055556797d500(0000) GS:ffff88808d416000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2005460000 CR3: 0000000036d1b000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 path_openat+0x2b3/0x3dd0 fs/namei.c:4783
 do_filp_open+0x1fa/0x410 fs/namei.c:4814
 do_sys_openat2+0x121/0x200 fs/open.c:1430
 do_sys_open fs/open.c:1436 [inline]
 __do_sys_openat fs/open.c:1452 [inline]
 __se_sys_openat fs/open.c:1447 [inline]
 __x64_sys_openat+0x138/0x170 fs/open.c:1447
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9a5b38f7c9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcb381c768 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f9a5b5e5fa0 RCX: 00007f9a5b38f7c9
RDX: 000000000000275a RSI: 0000200000000040 RDI: ffffffffffffff9c
RBP: 00007f9a5b413f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9a5b5e5fa0 R14: 00007f9a5b5e5fa0 R15: 0000000000000004
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:lookup_inode_permission_may_exec fs/namei.c:630 [inline]
RIP: 0010:may_lookup fs/namei.c:1900 [inline]
RIP: 0010:link_path_walk+0x18cb/0x18d0 fs/namei.c:2537
Code: e8 ba 78 e9 fe 90 0f 0b e8 82 41 82 ff 44 89 fd e9 6a fd ff ff e8 75 41 82 ff 48 89 ef 48 c7 c6 80 e8 79 8b e8 96 78 e9 fe 90 <0f> 0b 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 55
RSP: 0018:ffffc900035a78a0 EFLAGS: 00010282
RAX: 000000000000008e RBX: ffffc900035a7c58 RCX: 9c94389a78a54b00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffff888045864178 R08: ffffc900035a75c7 R09: 1ffff920006b4eb8
R10: dffffc0000000000 R11: fffff520006b4eb9 R12: 0000000000008000
R13: ffffc900035a7c20 R14: 0000000000008000 R15: ffff88803e713320
FS:  000055556797d500(0000) GS:ffff88808d416000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f200df73460 CR3: 0000000036d1b000 CR4: 0000000000352ef0