kobject_add_internal failed for hci3 (error: -2 parent: bluetooth) Bluetooth: Can't register HCI device WARNING: CPU: 0 PID: 8101 at fs/kernfs/dir.c:494 kernfs_get.part.0+0x73/0x90 fs/kernfs/dir.c:494 Kernel panic - not syncing: panic_on_warn set ... kobject: 'bluetooth' (000000008474fb80): kobject_add_internal: parent: 'virtual', set: '(null)' CPU: 0 PID: 8101 Comm: syz-executor499 Not tainted 5.0.0-rc8+ #89 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 panic+0x2cb/0x65c kernel/panic.c:214 kobject: 'hci2' (000000001bfbc427): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'hci1' (000000000aeb0598): kobject_add_internal: parent: 'bluetooth', set: 'devices' __warn.cold+0x20/0x45 kernel/panic.c:571 report_bug+0x263/0x2b0 lib/bug.c:186 kobject: 'hci2' (000000001bfbc427): kobject_uevent_env fixup_bug arch/x86/kernel/traps.c:178 [inline] fixup_bug arch/x86/kernel/traps.c:173 [inline] do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:271 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:290 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:973 RIP: 0010:kernfs_get.part.0+0x73/0x90 fs/kernfs/dir.c:494 Code: e6 e8 f1 ce 9d ff 45 85 e4 74 1a e8 67 cd 9d ff be 04 00 00 00 48 89 df e8 7a a7 d4 ff f0 ff 03 5b 41 5c 5d c3 e8 4d cd 9d ff <0f> 0b eb dd 48 89 df e8 a1 cd d4 ff eb c1 0f 1f 44 00 00 66 2e 0f RSP: 0018:ffff88808a62f830 EFLAGS: 00010293 kobject: 'hci1' (000000000aeb0598): kobject_uevent_env RAX: ffff88809d536400 RBX: ffff88809f0bc9a0 RCX: ffffffff81d211af RDX: 0000000000000000 RSI: ffffffff81d211d3 RDI: 0000000000000005 RBP: ffff88808a62f840 R08: ffff88809d536400 R09: ffffed1013e17935 R10: ffffed1013e17934 R11: ffff88809f0bc9a3 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001 kobject: 'hci2' (000000001bfbc427): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2' kernfs_get fs/kernfs/dir.c:493 [inline] kernfs_new_node+0xb8/0x130 fs/kernfs/dir.c:698 kernfs_create_dir_ns+0x52/0x160 fs/kernfs/dir.c:1021 sysfs_create_dir_ns+0x131/0x2a0 fs/sysfs/dir.c:59 create_dir lib/kobject.c:88 [inline] kobject_add_internal lib/kobject.c:247 [inline] kobject_add_internal.cold+0xe5/0x5d4 lib/kobject.c:217 kobject: 'hci1' (000000000aeb0598): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1' kobject_add_varg lib/kobject.c:382 [inline] kobject_add+0x150/0x1c0 lib/kobject.c:426 kobject: 'rfkill491' (00000000c322c494): kobject_add_internal: parent: 'hci1', set: 'devices' kobject: 'rfkill491' (00000000c322c494): kobject_uevent_env device_add+0x3d5/0x1870 drivers/base/core.c:1912 hci_register_dev+0x304/0x880 net/bluetooth/hci_core.c:3261 kobject: 'rfkill491' (00000000c322c494): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/rfkill491' __vhci_create_device+0x2d0/0x5a0 drivers/bluetooth/hci_vhci.c:139 vhci_create_device drivers/bluetooth/hci_vhci.c:163 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:219 [inline] vhci_write+0x2d0/0x470 drivers/bluetooth/hci_vhci.c:299 call_write_iter include/linux/fs.h:1863 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x613/0x8e0 fs/read_write.c:487 kobject: 'rfkill492' (00000000ec0543c3): kobject_add_internal: parent: 'hci2', set: 'devices' vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0xea/0x1f0 fs/read_write.c:598 kobject: 'rfkill491' (00000000c322c494): kobject_uevent_env kobject: 'rfkill492' (00000000ec0543c3): kobject_uevent_env __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __ia32_sys_write+0x71/0xb0 fs/read_write.c:607 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x281/0xc98 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7fc7869 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000ffb4c48c EFLAGS: 00000246 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000200000c0 kobject: 'rfkill492' (00000000ec0543c3): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2/rfkill492' RDX: 0000000000000002 RSI: 0000000000000001 RDI: 00000000ffb4c5c4 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 kobject: 'rfkill491' (00000000c322c494): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/rfkill491' Kernel Offset: disabled Rebooting in 86400 seconds..