Bluetooth: Can't register HCI device Bluetooth: Can't register HCI device kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access kobject_add_internal failed for hci1 (error: -2 parent: bluetooth) general protection fault: 0000 [#1] PREEMPT SMP KASAN kobject: 'bluetooth' (000000002ac38ae8): kobject_add_internal: parent: 'virtual', set: '(null)' CPU: 0 PID: 8784 Comm: syz-executor895 Not tainted 4.20.0-rc7-next-20181224 #189 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:kernfs_add_one+0x342/0x4d0 fs/kernfs/dir.c:812 Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 49 01 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 6d 70 49 8d 7d 08 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 16 01 00 00 45 8b 6d 08 31 ff Bluetooth: Can't register HCI device RSP: 0018:ffff888098b1f5d0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff8880a79b6ee0 RCX: ffffffff87e74dc7 RDX: 0000000000000001 RSI: ffffffff81fd0d0a RDI: 0000000000000008 RBP: ffff888098b1f618 R08: fffffbfff1310afd R09: fffffbfff1310afc kobject: 'hci2' (000000008f5c5e01): kobject_add_internal: parent: 'bluetooth', set: 'devices' R10: fffffbfff1310afc R11: ffffffff898857e7 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000fad880(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000006cb090 CR3: 00000000950d6000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kobject: 'hci1' (00000000d1840835): kobject_cleanup, parent (null) DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: kernfs_create_dir_ns+0xf6/0x160 fs/kernfs/dir.c:1031 sysfs_create_dir_ns+0x19b/0x340 fs/sysfs/dir.c:58 kobject: 'hci2' (000000008f5c5e01): kobject_uevent_env kobject: 'hci1' (00000000d1840835): calling ktype release create_dir lib/kobject.c:88 [inline] kobject_add_internal.cold.11+0x116/0x6af lib/kobject.c:247 kobject: 'hci2' (000000008f5c5e01): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2' kobject_add_varg lib/kobject.c:382 [inline] kobject_add+0x13f/0x1b0 lib/kobject.c:426 kobject: 'hci1': free name device_add+0x445/0x18f0 drivers/base/core.c:1912 kobject: 'rfkill1045' (00000000c0a2dacf): kobject_add_internal: parent: 'hci2', set: 'devices' kobject: 'rfkill1045' (00000000c0a2dacf): kobject_uevent_env kobject: 'rfkill1045' (00000000c0a2dacf): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2/rfkill1045' hci_register_dev+0x3b3/0x9c0 net/bluetooth/hci_core.c:3261 kobject: 'rfkill1045' (00000000c0a2dacf): kobject_uevent_env __vhci_create_device+0x2c1/0x580 drivers/bluetooth/hci_vhci.c:139 kobject: 'rfkill1045' (00000000c0a2dacf): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2/rfkill1045' vhci_create_device drivers/bluetooth/hci_vhci.c:163 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:219 [inline] vhci_write+0x2d8/0x470 drivers/bluetooth/hci_vhci.c:299 call_write_iter include/linux/fs.h:1862 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x72c/0xab0 fs/read_write.c:487 kobject: 'rfkill1045' (00000000c0a2dacf): kobject_cleanup, parent (null) kobject: 'rfkill1045' (00000000c0a2dacf): calling ktype release vfs_write+0x1fc/0x580 fs/read_write.c:549 ksys_write+0x101/0x260 fs/read_write.c:598 __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 kobject: 'rfkill1045': free name do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 kobject: 'hci2' (000000008f5c5e01): kobject_uevent_env kobject: 'hci2' (000000008f5c5e01): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2' kobject: 'bluetooth' (000000002ac38ae8): kobject_cleanup, parent (null) entry_SYSCALL_64_after_hwframe+0x49/0xbe kobject: 'bluetooth' (000000002ac38ae8): calling ktype release RIP: 0033:0x440e59 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 0b 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffea2c47648 EFLAGS: 00000213 ORIG_RAX: 0000000000000001 kobject: 'bluetooth': free name RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440e59 RDX: 0000000000000002 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 0000000000000000 R08: 00000000004002c8 R09: 00000000004002c8 R10: 0000000000fad880 R11: 0000000000000213 R12: 000000000000ee22 R13: 0000000000401d80 R14: 0000000000000000 R15: 0000000000000000 kobject: 'hci2' (000000008f5c5e01): kobject_cleanup, parent (null) Modules linked in: kobject: 'bluetooth' (00000000835eb68b): kobject_add_internal: parent: 'virtual', set: '(null)' kobject: 'hci2' (000000008f5c5e01): calling ktype release kobject: 'hci1' (000000004aab1e0f): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'hci2': free name kobject: 'hci2' (000000003402aa33): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'hci5' (00000000d60b6a7e): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'hci4' (00000000bc480e6f): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'hci5' (00000000d60b6a7e): kobject_uevent_env kobject: 'hci0' (00000000febed243): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'hci5' (00000000d60b6a7e): fill_kobj_path: path = '/devices/virtual/bluetooth/hci5' kobject: 'hci0' (00000000febed243): kobject_uevent_env kobject: 'rfkill1046' (0000000080f013c2): kobject_add_internal: parent: 'hci5', set: 'devices' kobject: 'hci2' (000000003402aa33): kobject_uevent_env kobject: 'rfkill1046' (0000000080f013c2): kobject_uevent_env kobject: 'hci1' (000000004aab1e0f): kobject_uevent_env kobject: 'rfkill1046' (0000000080f013c2): fill_kobj_path: path = '/devices/virtual/bluetooth/hci5/rfkill1046' kobject: 'hci4' (00000000bc480e6f): kobject_uevent_env kobject: 'rfkill1046' (0000000080f013c2): kobject_uevent_env kobject: 'hci4' (00000000bc480e6f): fill_kobj_path: path = '/devices/virtual/bluetooth/hci4' kobject: 'hci1' (000000004aab1e0f): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1' kobject: 'rfkill1046' (0000000080f013c2): fill_kobj_path: path = '/devices/virtual/bluetooth/hci5/rfkill1046' kobject: 'hci2' (000000003402aa33): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2' kobject: 'rfkill1047' (000000005b91515b): kobject_add_internal: parent: 'hci1', set: 'devices' kobject: 'hci0' (00000000febed243): fill_kobj_path: path = '/devices/virtual/bluetooth/hci0' kobject: 'rfkill1047' (000000005b91515b): kobject_uevent_env kobject: 'rfkill1047' (000000005b91515b): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/rfkill1047' kobject: 'rfkill1046' (0000000080f013c2): kobject_cleanup, parent (null) kobject: 'rfkill1048' (000000006107eb87): kobject_add_internal: parent: 'hci4', set: 'devices' kobject: 'rfkill1047' (000000005b91515b): kobject_uevent_env kobject: 'rfkill1046' (0000000080f013c2): calling ktype release kobject: 'rfkill1048' (000000006107eb87): kobject_uevent_env kobject: 'rfkill1047' (000000005b91515b): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/rfkill1047' kobject: 'rfkill1046': free name kobject: 'rfkill1048' (000000006107eb87): fill_kobj_path: path = '/devices/virtual/bluetooth/hci4/rfkill1048' kobject: 'rfkill1049' (00000000d57b4718): kobject_add_internal: parent: 'hci0', set: 'devices' ---[ end trace d89da48449e441c4 ]--- kobject: 'rfkill1049' (00000000d57b4718): kobject_uevent_env kobject: 'hci5' (00000000d60b6a7e): kobject_uevent_env kobject: 'rfkill1048' (000000006107eb87): kobject_uevent_env kobject: 'rfkill1048' (000000006107eb87): fill_kobj_path: path = '/devices/virtual/bluetooth/hci4/rfkill1048' kobject: 'hci5' (00000000d60b6a7e): fill_kobj_path: path = '/devices/virtual/bluetooth/hci5' kobject: 'rfkill1049' (00000000d57b4718): fill_kobj_path: path = '/devices/virtual/bluetooth/hci0/rfkill1049' RIP: 0010:kernfs_add_one+0x342/0x4d0 fs/kernfs/dir.c:812 kobject: 'rfkill1050' (00000000aecf120d): kobject_add_internal: parent: 'hci2', set: 'devices' kobject: 'rfkill1049' (00000000d57b4718): kobject_uevent_env kobject: 'rfkill1049' (00000000d57b4718): fill_kobj_path: path = '/devices/virtual/bluetooth/hci0/rfkill1049' kobject: 'rfkill1050' (00000000aecf120d): kobject_uevent_env kobject: 'rfkill1050' (00000000aecf120d): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2/rfkill1050' kobject: 'hci5' (00000000d60b6a7e): kobject_cleanup, parent (null) kobject: 'rfkill1050' (00000000aecf120d): kobject_uevent_env Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 49 01 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 6d 70 49 8d 7d 08 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 16 01 00 00 45 8b 6d 08 31 ff kobject: 'rfkill1047' (000000005b91515b): kobject_cleanup, parent (null) kobject: 'rfkill1048' (000000006107eb87): kobject_cleanup, parent (null) kobject: 'rfkill1049' (00000000d57b4718): kobject_cleanup, parent (null) kobject: 'hci5' (00000000d60b6a7e): calling ktype release kobject: 'rfkill1050' (00000000aecf120d): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2/rfkill1050' RSP: 0018:ffff888098b1f5d0 EFLAGS: 00010202 kobject: 'rfkill1049' (00000000d57b4718): calling ktype release kobject: 'hci5': free name kobject: 'rfkill1048' (000000006107eb87): calling ktype release RAX: dffffc0000000000 RBX: ffff8880a79b6ee0 RCX: ffffffff87e74dc7 kobject: 'rfkill1048': free name kobject: 'rfkill1049': free name kobject: 'rfkill1050' (00000000aecf120d): kobject_cleanup, parent (null) kobject: 'hci4' (00000000bc480e6f): kobject_uevent_env kobject: 'hci0' (00000000febed243): kobject_uevent_env kobject: 'rfkill1047' (000000005b91515b): calling ktype release kobject: 'hci5' (00000000deede612): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'hci4' (00000000bc480e6f): fill_kobj_path: path = '/devices/virtual/bluetooth/hci4' kobject: 'hci0' (00000000febed243): fill_kobj_path: path = '/devices/virtual/bluetooth/hci0' kobject: 'rfkill1050' (00000000aecf120d): calling ktype release kobject: 'rfkill1047': free name kobject: 'hci0' (00000000febed243): kobject_cleanup, parent (null) RDX: 0000000000000001 RSI: ffffffff81fd0d0a RDI: 0000000000000008 kobject: 'hci1' (000000004aab1e0f): kobject_uevent_env kobject: 'hci0' (00000000febed243): calling ktype release kobject: 'hci4' (00000000bc480e6f): kobject_cleanup, parent (null) kobject: 'hci1' (000000004aab1e0f): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1' kobject: 'hci0': free name kobject: 'hci4' (00000000bc480e6f): calling ktype release kobject: 'hci1' (000000004aab1e0f): kobject_cleanup, parent (null) RBP: ffff888098b1f618 R08: fffffbfff1310afd R09: fffffbfff1310afc kobject: 'hci4': free name kobject: 'rfkill1050': free name kobject: 'hci1' (000000004aab1e0f): calling ktype release kobject: 'hci5' (00000000deede612): kobject_uevent_env kobject: 'hci0' (00000000ec7f6230): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'hci5' (00000000deede612): fill_kobj_path: path = '/devices/virtual/bluetooth/hci5' kobject: 'hci2' (000000003402aa33): kobject_uevent_env kobject: 'hci0' (00000000ec7f6230): kobject_uevent_env kobject: 'hci1' (000000000f8340d9): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'hci1': free name kobject: 'rfkill1051' (000000004cd5fbe6): kobject_add_internal: parent: 'hci5', set: 'devices' R10: fffffbfff1310afc R11: ffffffff898857e7 R12: 0000000000000000 kobject: 'hci1' (000000000f8340d9): kobject_uevent_env kobject: 'hci0' (00000000ec7f6230): fill_kobj_path: path = '/devices/virtual/bluetooth/hci0' R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 kobject: 'hci2' (000000003402aa33): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2' kobject: 'hci2' (000000003402aa33): kobject_cleanup, parent (null) FS: 0000000000fad880(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000 kobject: 'hci2' (0000000060319fa0): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'rfkill1051' (000000004cd5fbe6): kobject_uevent_env kobject: 'hci1' (000000000f8340d9): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1' kobject: 'rfkill1051' (000000004cd5fbe6): fill_kobj_path: path = '/devices/virtual/bluetooth/hci5/rfkill1051' kobject: 'hci2' (000000003402aa33): calling ktype release kobject: 'rfkill1051' (000000004cd5fbe6): kobject_uevent_env kobject: 'rfkill1052' (000000009cdd069e): kobject_add_internal: parent: 'hci0', set: 'devices' kobject: 'hci2' (0000000060319fa0): kobject_uevent_env CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kobject: 'rfkill1051' (000000004cd5fbe6): fill_kobj_path: path = '/devices/virtual/bluetooth/hci5/rfkill1051' kobject: 'rfkill1052' (000000009cdd069e): kobject_uevent_env kobject: 'hci2' (0000000060319fa0): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2' kobject: 'hci2': free name CR2: 00007f168cd36000 CR3: 00000000950d6000 CR4: 00000000001406e0 kobject: 'rfkill1052' (000000009cdd069e): fill_kobj_path: path = '/devices/virtual/bluetooth/hci0/rfkill1052' DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kobject: 'rfkill1053' (00000000c6cef4c0): kobject_add_internal: parent: 'hci1', set: 'devices' DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 kobject: 'rfkill1052' (000000009cdd069e): kobject_uevent_env