Kernel bug: BUG: unable to handle kernel paging request in dt2815_attach
Subsystem: comedi
Status: fixed

Crash report:
BUG: unable to handle page fault for address: fffffffffffffff0
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD e14b067 P4D e14b067 PUD e14d067 PMD 0 
Oops: Oops: 0002 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5496 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 04/01/2014
RIP: 0010:__outb arch/x86/include/asm/shared/io.h:22 [inline]
RIP: 0010:dt2815_attach+0x5a3/0x8f0 drivers/comedi/drivers/dt2815.c:199
Code: e6 83 e6 60 31 ff e8 0c 7d e3 f8 41 83 e4 60 74 35 e8 c1 78 e3 f8 42 80 3c 2b 00 74 08 4c 89 ff e8 32 0b 4c f9 41 8b 17 ff c2 <31> 66 90 83 fd 63 75 1e e9 96 00 00 00 e8 9b 78 e3 f8 83 fd 63 75
RSP: 0018:ffffc90002a5fa78 EFLAGS: 00010206
RAX: ffffffff88df2f7f RBX: 1ffff110081a053a RCX: ffff888011d224c0
RDX: 000000000000007e RSI: 0000000000000060 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffff888011d224c0 R09: 0000000000000002
R10: 0000000000000004 R11: 0000000000000000 R12: 0000000000000060
R13: dffffc0000000000 R14: ffffc90002a5fbc0 R15: ffff888040d029d0
FS:  000055555a3d0500(0000) GS:ffff88808cf1d000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffff0 CR3: 0000000040fed000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 comedi_device_attach+0x51f/0x720 drivers/comedi/drivers.c:1069
 do_devconfig_ioctl drivers/comedi/comedi_fops.c:928 [inline]
 comedi_unlocked_ioctl+0x701/0x1240 drivers/comedi/comedi_fops.c:2240
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f975339acb9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc13841358 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f9753615fa0 RCX: 00007f975339acb9
RDX: 0000200000000080 RSI: 0000000040946400 RDI: 0000000000000003
RBP: 00007f9753408bf7 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9753615fac R14: 00007f9753615fa0 R15: 00007f9753615fa0
 </TASK>
Modules linked in:
CR2: fffffffffffffff0
---[ end trace 0000000000000000 ]---
RIP: 0010:__outb arch/x86/include/asm/shared/io.h:22 [inline]
RIP: 0010:dt2815_attach+0x5a3/0x8f0 drivers/comedi/drivers/dt2815.c:199
Code: e6 83 e6 60 31 ff e8 0c 7d e3 f8 41 83 e4 60 74 35 e8 c1 78 e3 f8 42 80 3c 2b 00 74 08 4c 89 ff e8 32 0b 4c f9 41 8b 17 ff c2 <31> 66 90 83 fd 63 75 1e e9 96 00 00 00 e8 9b 78 e3 f8 83 fd 63 75
RSP: 0018:ffffc90002a5fa78 EFLAGS: 00010206
RAX: ffffffff88df2f7f RBX: 1ffff110081a053a RCX: ffff888011d224c0
RDX: 000000000000007e RSI: 0000000000000060 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffff888011d224c0 R09: 0000000000000002
R10: 0000000000000004 R11: 0000000000000000 R12: 0000000000000060
R13: dffffc0000000000 R14: ffffc90002a5fbc0 R15: ffff888040d029d0
FS:  000055555a3d0500(0000) GS:ffff88808cf1d000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffff0 CR3: 0000000040fed000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
   0:	e6 83                	out    %al,$0x83
   2:	e6 60                	out    %al,$0x60
   4:	31 ff                	xor    %edi,%edi
   6:	e8 0c 7d e3 f8       	call   0xf8e37d17
   b:	41 83 e4 60          	and    $0x60,%r12d
   f:	74 35                	je     0x46
  11:	e8 c1 78 e3 f8       	call   0xf8e378d7
  16:	42 80 3c 2b 00       	cmpb   $0x0,(%rbx,%r13,1)
  1b:	74 08                	je     0x25
  1d:	4c 89 ff             	mov    %r15,%rdi
  20:	e8 32 0b 4c f9       	call   0xf94c0b57
  25:	41 8b 17             	mov    (%r15),%edx
  28:	ff c2                	inc    %edx
* 2a:	31 66 90             	xor    %esp,-0x70(%rsi) <-- trapping instruction
  2d:	83 fd 63             	cmp    $0x63,%ebp
  30:	75 1e                	jne    0x50
  32:	e9 96 00 00 00       	jmp    0xcd
  37:	e8 9b 78 e3 f8       	call   0xf8e378d7
  3c:	83 fd 63             	cmp    $0x63,%ebp
  3f:	75                   	.byte 0x75