Kernel bug: WARNING in driver_unregister (2)
Subsystem: kernel
Status: fixed

Crash report:
Unexpected driver unregister!
WARNING: drivers/base/driver.c:273 at 0x0, CPU#1: syz.0.17/6008
Modules linked in:
CPU: 1 UID: 0 PID: 6008 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:driver_unregister drivers/base/driver.c:273 [inline]
RIP: 0010:driver_unregister+0x89/0xb0 drivers/base/driver.c:270
Code: 00 75 3a 48 8b 73 68 48 89 ef e8 72 90 8a fc 48 89 df e8 1a 94 ff ff 5b 5d e9 b3 86 df fb e8 ae 86 df fb 48 8d 3d 77 55 b2 0a <67> 48 0f b9 3a 5b 5d e9 9b 86 df fb e8 e6 90 48 fc eb 9a e8 df 90
RSP: 0018:ffffc90002ef79a0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffffff8ff42be0 RCX: ffffffff88c3d4eb
RDX: ffff88807c748000 RSI: ffffffff85de7df2 RDI: ffffffff9090d370
RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff8ff42b20
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff88814ca88000
FS:  000055555c2fe500(0000) GS:ffff888124a7e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2f963fff CR3: 0000000076f23000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 comedi_device_detach_locked+0x12f/0xa50 drivers/comedi/drivers.c:207
 comedi_device_detach+0x67/0xb0 drivers/comedi/drivers.c:215
 comedi_device_attach+0x43d/0x900 drivers/comedi/drivers.c:1011
 do_devconfig_ioctl+0x1b1/0x710 drivers/comedi/comedi_fops.c:872
 comedi_unlocked_ioctl+0x165d/0x2ee0 drivers/comedi/comedi_fops.c:2178
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl fs/ioctl.c:583 [inline]
 __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f958238f749
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:00007ffdc1b08e88 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f95825e5fa0 RCX: 00007f958238f749
RDX: 0000200000000080 RSI: 0000000040946400 RDI: 0000000000000003
RBP: 00007f9582413f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f95825e5fa0 R14: 00007f95825e5fa0 R15: 0000000000000003
 </TASK>
----------------
Code disassembly (best guess):
   0:	00 75 3a             	add    %dh,0x3a(%rbp)
   3:	48 8b 73 68          	mov    0x68(%rbx),%rsi
   7:	48 89 ef             	mov    %rbp,%rdi
   a:	e8 72 90 8a fc       	call   0xfc8a9081
   f:	48 89 df             	mov    %rbx,%rdi
  12:	e8 1a 94 ff ff       	call   0xffff9431
  17:	5b                   	pop    %rbx
  18:	5d                   	pop    %rbp
  19:	e9 b3 86 df fb       	jmp    0xfbdf86d1
  1e:	e8 ae 86 df fb       	call   0xfbdf86d1
  23:	48 8d 3d 77 55 b2 0a 	lea    0xab25577(%rip),%rdi        # 0xab255a1
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	5b                   	pop    %rbx
  30:	5d                   	pop    %rbp
  31:	e9 9b 86 df fb       	jmp    0xfbdf86d1
  36:	e8 e6 90 48 fc       	call   0xfc489121
  3b:	eb 9a                	jmp    0xffffffd7
  3d:	e8                   	.byte 0xe8
  3e:	df                   	.byte 0xdf
  3f:	90                   	nop