Bluetooth: hci2: Error when powering off device on rfkill (-4) ------------[ cut here ]------------ ida_free called for id=8192 which is not allocated. WARNING: CPU: 0 PID: 11267 at lib/idr.c:525 ida_free+0x370/0x420 lib/idr.c:525 Modules linked in: CPU: 0 PID: 11267 Comm: syz.3.979 Not tainted 6.10.0-rc6-syzkaller-00069-g795c58e4c7fc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 RIP: 0010:ida_free+0x370/0x420 lib/idr.c:525 Code: 10 42 80 3c 28 00 74 05 e8 8d bd 82 f6 48 8b 7c 24 40 4c 89 fe e8 40 a5 17 00 90 48 c7 c7 60 33 ec 8c 89 de e8 51 36 df f5 90 <0f> 0b 90 90 eb 3d e8 05 08 1d f6 49 bd 00 00 00 00 00 fc ff df 4d RSP: 0018:ffffc9001259f8e0 EFLAGS: 00010246 RAX: 51b8b25285d34f00 RBX: 0000000000002000 RCX: 0000000000040000 RDX: ffffc900046c1000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffffc9001259f9d0 R08: ffffffff81585822 R09: fffffbfff1c39994 R10: dffffc0000000000 R11: fffffbfff1c39994 R12: ffffc9001259f920 R13: dffffc0000000000 R14: ffff88801f2e40a0 R15: 0000000000000246 FS: 00007fa3d47136c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055556b2d7588 CR3: 0000000067806000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: hci_conn_cleanup net/bluetooth/hci_conn.c:156 [inline] hci_conn_del+0x746/0xc40 net/bluetooth/hci_conn.c:1154 hci_conn_hash_flush+0x18e/0x240 net/bluetooth/hci_conn.c:2585 hci_dev_close_sync+0x911/0xf60 net/bluetooth/hci_sync.c:5062 hci_dev_do_close+0x30/0x90 net/bluetooth/hci_core.c:556 hci_rfkill_set_block+0x232/0x300 net/bluetooth/hci_core.c:982 rfkill_set_block+0x1f1/0x440 net/rfkill/core.c:346 rfkill_fop_write+0x5bb/0x790 net/rfkill/core.c:1305 vfs_write+0x2a2/0xc90 fs/read_write.c:588 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa3d3975bd9 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:00007fa3d4713048 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fa3d3b04038 RCX: 00007fa3d3975bd9 RDX: 0000000000000008 RSI: 0000000020000080 RDI: 0000000000000005 RBP: 00007fa3d39e4aa1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007fa3d3b04038 R15: 00007fa3d3c2fa68