Kernel bug: general protection fault in metapage_write_folio
Subsystem: jfs
Status: open

Crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 UID: 0 PID: 122 Comm: jfsCommit Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:metapage_write_folio+0xa8/0xca0 fs/jfs/jfs_metapage.c:428
Code: e8 bd 45 82 fe 4d 8d 74 24 18 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 42 04 e4 fe 4d 8b 36 4c 89 f0 48 c1 e8 03 <42> 80 3c 38 00 74 08 4c 89 f7 e8 29 04 e4 fe 49 8b 1e 4d 8d 74 24
RSP: 0018:ffffc900031df7a0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 1ffffd40002b6ebe RCX: ffff88801df68000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900031df8b0 R08: ffffea00015b75f7 R09: 1ffffd40002b6ebe
R10: dffffc0000000000 R11: fffff940002b6ebf R12: ffffea00015b75c0
R13: 0000000000000081 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff888126df7000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f66d4016000 CR3: 000000003a8f0000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 metapage_write_one+0x24c/0x450 fs/jfs/jfs_metapage.c:818
 release_metapage+0x5b9/0xab0 fs/jfs/jfs_metapage.c:884
 txUnlock+0x509/0xdc0 fs/jfs/jfs_txnmgr.c:948
 txLazyCommit fs/jfs/jfs_txnmgr.c:2683 [inline]
 jfs_lazycommit+0x52e/0xa10 fs/jfs/jfs_txnmgr.c:2734
 kthread+0x711/0x8a0 kernel/kthread.c:463
 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:metapage_write_folio+0xa8/0xca0 fs/jfs/jfs_metapage.c:428
Code: e8 bd 45 82 fe 4d 8d 74 24 18 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 42 04 e4 fe 4d 8b 36 4c 89 f0 48 c1 e8 03 <42> 80 3c 38 00 74 08 4c 89 f7 e8 29 04 e4 fe 49 8b 1e 4d 8d 74 24
RSP: 0018:ffffc900031df7a0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 1ffffd40002b6ebe RCX: ffff88801df68000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900031df8b0 R08: ffffea00015b75f7 R09: 1ffffd40002b6ebe
R10: dffffc0000000000 R11: fffff940002b6ebf R12: ffffea00015b75c0
R13: 0000000000000081 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff888126df7000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f66d4016000 CR3: 000000003a8f0000 CR4: 00000000003526f0
----------------
Code disassembly (best guess):
   0:	e8 bd 45 82 fe       	call   0xfe8245c2
   5:	4d 8d 74 24 18       	lea    0x18(%r12),%r14
   a:	4c 89 f0             	mov    %r14,%rax
   d:	48 c1 e8 03          	shr    $0x3,%rax
  11:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1)
  16:	74 08                	je     0x20
  18:	4c 89 f7             	mov    %r14,%rdi
  1b:	e8 42 04 e4 fe       	call   0xfee40462
  20:	4d 8b 36             	mov    (%r14),%r14
  23:	4c 89 f0             	mov    %r14,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	4c 89 f7             	mov    %r14,%rdi
  34:	e8 29 04 e4 fe       	call   0xfee40462
  39:	49 8b 1e             	mov    (%r14),%rbx
  3c:	4d                   	rex.WRB
  3d:	8d                   	.byte 0x8d
  3e:	74 24                	je     0x64