Kernel bug: general protection fault in btrfs_evict_inode
Subsystem: btrfs
Status: fixed

Crash report:
BTRFS info (device loop0): enabling auto defrag
BTRFS info (device loop0): force zlib compression, level 3
BTRFS info (device loop0): max_inline set to 0
Oops: general protection fault, probably for non-canonical address 0xdffffc000000003e: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x00000000000001f0-0x00000000000001f7]
CPU: 0 UID: 0 PID: 5490 Comm: syz.0.17 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:btrfs_root_id fs/btrfs/ctree.h:333 [inline]
RIP: 0010:do_perf_trace_btrfs__inode include/trace/events/btrfs.h:204 [inline]
RIP: 0010:perf_trace_btrfs__inode+0x44d/0x580 include/trace/events/btrfs.h:204
Code: c1 e8 03 42 80 3c 30 00 74 08 4c 89 ff e8 db 43 66 fe 4d 8b 2f 4d 8d bd f7 01 00 00 49 81 c5 fe 01 00 00 4c 89 f8 48 c1 e8 03 <42> 0f b6 04 30 84 c0 0f 85 e4 00 00 00 4c 89 e8 48 c1 e8 03 42 0f
RSP: 0018:ffffc90002b7f800 EFLAGS: 00010203
RAX: 000000000000003e RBX: ffffe8ffffc4ec68 RCX: ffffffff83c10ce7
RDX: 0000000000000010 RSI: ffff888058f38000 RDI: ffffe8ffffc4ec30
RBP: ffffc90002b7f8d0 R08: 7c477e297af65e39 R09: 5d3eb9a580cd6d81
R10: 7c477e297af65e39 R11: 5d3eb9a580cd6d81 R12: ffffe8ffffc4ec28
R13: 00000000000001fe R14: dffffc0000000000 R15: 00000000000001f7
FS:  000055557f4fd500(0000) GS:ffff88808d733000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564f8ff39890 CR3: 0000000012254000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 __do_trace_btrfs_inode_evict include/trace/events/btrfs.h:255 [inline]
 trace_btrfs_inode_evict include/trace/events/btrfs.h:255 [inline]
 btrfs_evict_inode+0x107a/0x1110 fs/btrfs/inode.c:5480
 evict+0x504/0x9c0 fs/inode.c:810
 btrfs_create_common+0x1c9/0x230 fs/btrfs/inode.c:6800
 btrfs_mkdir+0xc7/0xf0 fs/btrfs/inode.c:6927
 vfs_mkdir+0x306/0x510 fs/namei.c:4453
 do_mkdirat+0x247/0x590 fs/namei.c:4486
 __do_sys_mkdirat fs/namei.c:4503 [inline]
 __se_sys_mkdirat fs/namei.c:4501 [inline]
 __x64_sys_mkdirat+0x87/0xa0 fs/namei.c:4501
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2decb8d717
Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 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:00007ffd6e980498 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007ffd6e980520 RCX: 00007f2decb8d717
RDX: 00000000000001ff RSI: 0000200000000140 RDI: 00000000ffffff9c
RBP: 0000200000000180 R08: 00002000000000c0 R09: 0000000000000000
R10: 0000200000000180 R11: 0000000000000246 R12: 0000200000000140
R13: 00007ffd6e9804e0 R14: 0000000000000000 R15: 0000200000000080
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btrfs_root_id fs/btrfs/ctree.h:333 [inline]
RIP: 0010:do_perf_trace_btrfs__inode include/trace/events/btrfs.h:204 [inline]
RIP: 0010:perf_trace_btrfs__inode+0x44d/0x580 include/trace/events/btrfs.h:204
Code: c1 e8 03 42 80 3c 30 00 74 08 4c 89 ff e8 db 43 66 fe 4d 8b 2f 4d 8d bd f7 01 00 00 49 81 c5 fe 01 00 00 4c 89 f8 48 c1 e8 03 <42> 0f b6 04 30 84 c0 0f 85 e4 00 00 00 4c 89 e8 48 c1 e8 03 42 0f
RSP: 0018:ffffc90002b7f800 EFLAGS: 00010203
RAX: 000000000000003e RBX: ffffe8ffffc4ec68 RCX: ffffffff83c10ce7
RDX: 0000000000000010 RSI: ffff888058f38000 RDI: ffffe8ffffc4ec30
RBP: ffffc90002b7f8d0 R08: 7c477e297af65e39 R09: 5d3eb9a580cd6d81
R10: 7c477e297af65e39 R11: 5d3eb9a580cd6d81 R12: ffffe8ffffc4ec28
R13: 00000000000001fe R14: dffffc0000000000 R15: 00000000000001f7
FS:  000055557f4fd500(0000) GS:ffff88808d733000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564f8ff39890 CR3: 0000000012254000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
   0:	c1 e8 03             	shr    $0x3,%eax
   3:	42 80 3c 30 00       	cmpb   $0x0,(%rax,%r14,1)
   8:	74 08                	je     0x12
   a:	4c 89 ff             	mov    %r15,%rdi
   d:	e8 db 43 66 fe       	call   0xfe6643ed
  12:	4d 8b 2f             	mov    (%r15),%r13
  15:	4d 8d bd f7 01 00 00 	lea    0x1f7(%r13),%r15
  1c:	49 81 c5 fe 01 00 00 	add    $0x1fe,%r13
  23:	4c 89 f8             	mov    %r15,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 0f b6 04 30       	movzbl (%rax,%r14,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	0f 85 e4 00 00 00    	jne    0x11b
  37:	4c 89 e8             	mov    %r13,%rax
  3a:	48 c1 e8 03          	shr    $0x3,%rax
  3e:	42                   	rex.X
  3f:	0f                   	.byte 0xf