Kernel bug: general protection fault in gpiolib_seq_stop
Subsystem: gpio
Status: open

Crash report:
RSP: 002b:00007fcc5b84f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007fcc5abb5fa0 RCX: 00007fcc5a98ebe9
RDX: 0000000000010000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007fcc5b84f090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007fcc5abb6038 R14: 00007fcc5abb5fa0 R15: 00007ffc32b04798
 </TASK>
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: 6058 Comm: syz.0.17 Not tainted 6.16.0-syzkaller-12288-g2b38afce25c4 #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:gpiolib_seq_stop+0x4c/0xe0 drivers/gpio/gpiolib.c:5306
Code: 48 c1 ea 03 80 3c 02 00 0f 85 98 00 00 00 48 8b 9b e0 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7b 04 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 60 8b
RSP: 0018:ffffc90003047ad8 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000400
RDX: 0000000000000000 RSI: ffffffff8518f26e RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000dc0 R09: 00000000ffffffff
R10: ffffffff8e78aa93 R11: 0000000000000001 R12: 0000000000000000
R13: ffffffff8c19df60 R14: 0000000000010000 R15: 0000000000000000
FS:  00007fcc5b84f6c0(0000) GS:ffff8881246c6000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b32263fff CR3: 000000007a6a8000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 seq_read_iter+0x60d/0x12c0 fs/seq_file.c:251
 seq_read+0x3a3/0x570 fs/seq_file.c:162
 full_proxy_read+0x12e/0x1a0 fs/debugfs/file.c:378
 vfs_read+0x1e4/0xcf0 fs/read_write.c:570
 ksys_read+0x12a/0x250 fs/read_write.c:715
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0x490 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fcc5a98ebe9
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:00007fcc5b84f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007fcc5abb5fa0 RCX: 00007fcc5a98ebe9
RDX: 0000000000010000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007fcc5b84f090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007fcc5abb6038 R14: 00007fcc5abb5fa0 R15: 00007ffc32b04798
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:gpiolib_seq_stop+0x4c/0xe0 drivers/gpio/gpiolib.c:5306
Code: 48 c1 ea 03 80 3c 02 00 0f 85 98 00 00 00 48 8b 9b e0 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7b 04 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 60 8b
RSP: 0018:ffffc90003047ad8 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000400
RDX: 0000000000000000 RSI: ffffffff8518f26e RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000dc0 R09: 00000000ffffffff
R10: ffffffff8e78aa93 R11: 0000000000000001 R12: 0000000000000000
R13: ffffffff8c19df60 R14: 0000000000010000 R15: 0000000000000000
FS:  00007fcc5b84f6c0(0000) GS:ffff8881246c6000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005576b9f17950 CR3: 000000007a6a8000 CR4: 00000000003526f0
----------------
Code disassembly (best guess):
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 98 00 00 00    	jne    0xa6
   e:	48 8b 9b e0 00 00 00 	mov    0xe0(%rbx),%rbx
  15:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1c:	fc ff df
  1f:	48 8d 7b 04          	lea    0x4(%rbx),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 14 02          	movzbl (%rdx,%rax,1),%edx <-- trapping instruction
  2e:	48 89 f8             	mov    %rdi,%rax
  31:	83 e0 07             	and    $0x7,%eax
  34:	83 c0 03             	add    $0x3,%eax
  37:	38 d0                	cmp    %dl,%al
  39:	7c 04                	jl     0x3f
  3b:	84 d2                	test   %dl,%dl
  3d:	75 60                	jne    0x9f
  3f:	8b                   	.byte 0x8b