------------[ cut here ]------------ DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 3 PID: 19099 at kernel/locking/lockdep.c:238 hlock_class kernel/locking/lockdep.c:238 [inline] WARNING: CPU: 3 PID: 19099 at kernel/locking/lockdep.c:238 hlock_class+0x64/0x70 kernel/locking/lockdep.c:227 Modules linked in: CPU: 3 UID: 0 PID: 19099 Comm: syz.2.4005 Not tainted 6.17.0-rc1-syzkaller-00116-gd7ee5bdce789 #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:hlock_class kernel/locking/lockdep.c:238 [inline] RIP: 0010:hlock_class+0x64/0x70 kernel/locking/lockdep.c:227 Code: cc 90 e8 cf 5d 46 03 85 c0 74 23 8b 05 75 b0 14 0f 85 c0 75 19 90 48 c7 c6 a1 69 e2 8d 48 c7 c7 a4 15 e1 8d e8 4d 11 e3 ff 90 <0f> 0b 90 90 90 eb c9 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc9000383f528 EFLAGS: 00010086 RAX: 0000000000000000 RBX: ffff88804ea3af30 RCX: ffffc9000c402000 RDX: 0000000000080000 RSI: ffffffff817a02d5 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 000000002d2d2d2d R12: ffff88804ea3afa8 R13: ffff88804ea3a440 R14: 0000000000000000 R15: ffffffff8b4cd2c8 FS: 0000000000000000(0000) GS:ffff8880977c6000(0063) knlGS:00000000f54e6b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000f7f955c0 CR3: 0000000062ff2000 CR4: 0000000000352ef0 Call Trace: check_wait_context kernel/locking/lockdep.c:4854 [inline] __lock_acquire+0x218/0x1ce0 kernel/locking/lockdep.c:5187 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x179/0x350 kernel/locking/lockdep.c:5825 down_write+0x92/0x200 kernel/locking/rwsem.c:1590 kernfs_remove_by_name_ns+0x3d/0x110 fs/kernfs/dir.c:1712 sysfs_remove_file include/linux/sysfs.h:777 [inline] driver_remove_file drivers/base/driver.c:201 [inline] driver_remove_file+0x4a/0x60 drivers/base/driver.c:197 remove_bind_files drivers/base/bus.c:605 [inline] bus_remove_driver+0x224/0x2c0 drivers/base/bus.c:743 driver_unregister+0x76/0xb0 drivers/base/driver.c:277 comedi_device_detach_locked+0x12c/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:1010 do_devconfig_ioctl+0x1b1/0x710 drivers/comedi/comedi_fops.c:872 comedi_unlocked_ioctl+0x165d/0x2f00 drivers/comedi/comedi_fops.c:2173 comedi_compat_ioctl+0x1d0/0x990 drivers/comedi/comedi_fops.c:3244 __do_compat_sys_ioctl fs/ioctl.c:696 [inline] __se_compat_sys_ioctl fs/ioctl.c:639 [inline] __ia32_compat_sys_ioctl+0x23f/0x370 fs/ioctl.c:639 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0x7c/0x3a0 arch/x86/entry/syscall_32.c:306 do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:331 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7fc8579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f54e655c EFLAGS: 00000296 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000040946400 RDX: 00000000800000c0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi