kobject_add_internal failed for hci2 (error: -2 parent: bluetooth) Bluetooth: Can't register HCI device WARNING: CPU: 0 PID: 7631 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: 'hci1' (000000005bfcc037): kobject_add_internal: parent: 'bluetooth', set: 'devices' CPU: 0 PID: 7631 Comm: syz-executor605 Not tainted 5.0.0+ #8 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 kobject: 'hci2' (00000000359503f4): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'hci2' (00000000359503f4): kobject_uevent_env panic+0x2cb/0x65c kernel/panic.c:214 kobject: 'hci1' (000000005bfcc037): kobject_uevent_env kobject: 'hci2' (00000000359503f4): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2' kobject: 'hci1' (000000005bfcc037): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1' __warn.cold+0x20/0x45 kernel/panic.c:571 report_bug+0x263/0x2b0 lib/bug.c:186 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 kobject: 'rfkill125' (000000002dcf9897): kobject_add_internal: parent: 'hci2', set: 'devices' 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 71 30 9d ff 45 85 e4 74 1a e8 e7 2e 9d ff be 04 00 00 00 48 89 df e8 6a a3 d4 ff f0 ff 03 5b 41 5c 5d c3 e8 cd 2e 9d ff <0f> 0b eb dd 48 89 df e8 91 c9 d4 ff eb c1 0f 1f 44 00 00 66 2e 0f kobject: 'rfkill125' (000000002dcf9897): kobject_uevent_env RSP: 0018:ffff88809090f840 EFLAGS: 00010293 RAX: ffff888086760100 RBX: ffff888092b209a0 RCX: ffffffff81d2bd6f RDX: 0000000000000000 RSI: ffffffff81d2bd93 RDI: 0000000000000005 RBP: ffff88809090f850 R08: ffff888086760100 R09: ffffed1012564135 R10: ffffed1012564134 R11: ffff888092b209a3 R12: 0000000000000000 kobject: 'rfkill125' (000000002dcf9897): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2/rfkill125' R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001 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 kobject: 'rfkill126' (00000000980b4ebc): kobject_add_internal: parent: 'hci1', set: 'devices' sysfs_create_dir_ns+0x131/0x2a0 fs/sysfs/dir.c:59 kobject: 'rfkill125' (000000002dcf9897): kobject_uevent_env kobject: 'rfkill125' (000000002dcf9897): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2/rfkill125' kobject: 'rfkill126' (00000000980b4ebc): kobject_uevent_env 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_add_varg lib/kobject.c:382 [inline] kobject_add+0x150/0x1c0 lib/kobject.c:426 kobject: 'rfkill126' (00000000980b4ebc): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/rfkill126' kobject: 'rfkill125' (000000002dcf9897): kobject_cleanup, parent (null) device_add+0x3d5/0x1870 drivers/base/core.c:1912 kobject: 'rfkill126' (00000000980b4ebc): kobject_uevent_env kobject: 'rfkill126' (00000000980b4ebc): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/rfkill126' hci_register_dev+0x304/0x880 net/bluetooth/hci_core.c:3307 kobject: 'rfkill125' (000000002dcf9897): calling ktype release __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 kobject: 'rfkill126' (00000000980b4ebc): kobject_cleanup, parent (null) call_write_iter include/linux/fs.h:1869 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x613/0x8e0 fs/read_write.c:487 kobject: 'rfkill125': free name kobject: 'rfkill126' (00000000980b4ebc): calling ktype release kobject: 'hci2' (00000000359503f4): kobject_uevent_env kobject: 'hci2' (00000000359503f4): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2' kobject: 'rfkill126': free name kobject: 'hci1' (000000005bfcc037): kobject_uevent_env vfs_write+0x20c/0x580 fs/read_write.c:549 kobject: 'hci2' (00000000359503f4): kobject_cleanup, parent (null) ksys_write+0xea/0x1f0 fs/read_write.c:598 kobject: 'hci2' (00000000359503f4): calling ktype release kobject: 'hci1' (000000005bfcc037): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1' __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 kobject: 'hci2': free name entry_SYSCALL_64_after_hwframe+0x49/0xbe kobject: 'bluetooth' (000000002322cb7f): kobject_cleanup, parent (null) RIP: 0033:0x441129 Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 eb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 kobject: 'bluetooth' (000000002322cb7f): calling ktype release RSP: 002b:00007ffe0b048f38 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000441129 RDX: 0000000000000002 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 000000000000adb0 R08: 00000000004002c8 R09: 00000000004002c8 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000401ea0 kobject: 'bluetooth': free name R13: 0000000000401f30 R14: 0000000000000000 R15: 0000000000000000 kobject: 'hci1' (000000005bfcc037): kobject_cleanup, parent (null) Kernel Offset: disabled Rebooting in 86400 seconds..