==================================================================
BUG: KASAN: use-after-free in kobject_get+0x113/0x120 lib/kobject.c:663
Read of size 1 at addr ffff88812686e03c by task syz.7.726/2703
CPU: 0 PID: 2703 Comm: syz.7.726 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
__dump_stack+0x21/0x30 lib/dump_stack.c:88
dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0x10f/0x150 mm/kasan/report.c:444
__asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306
kobject_get+0x113/0x120 lib/kobject.c:663
get_device drivers/base/core.c:3518 [inline]
device_add+0x2f0/0xe90 drivers/base/core.c:3342
device_create_groups_vargs drivers/base/core.c:4118 [inline]
device_create+0x26c/0x300 drivers/base/core.c:4160
create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:31
create_alsa_device drivers/usb/gadget/function/f_midi.c:1262 [inline]
f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1303
try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline]
usb_get_function_instance+0xe2/0x2f0 drivers/usb/gadget/functions.c:44
function_make+0x118/0x350 drivers/usb/gadget/configfs.c:642
configfs_mkdir+0x50a/0x9c0 fs/configfs/dir.c:1356
vfs_mkdir+0x38b/0x590 fs/namei.c:4073
do_mkdirat+0x174/0x4d0 fs/namei.c:4098
__do_sys_mkdirat fs/namei.c:4113 [inline]
__se_sys_mkdirat fs/namei.c:4111 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4111
x64_sys_call+0x37e/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f1651c4d559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f16506a5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f1651ed3fa0 RCX: 00007f1651c4d559
RDX: 00000000000001ff RSI: 0000200000000b80 RDI: ffffffffffffff9c
RBP: 00007f1651ce4b20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1651ed4038 R14: 00007f1651ed3fa0 R15: 00007ffc2ebbf4d8
Allocated by task 882:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:433 [inline]
____kasan_kmalloc mm/kasan/common.c:512 [inline]
__kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:521
kasan_kmalloc include/linux/kasan.h:227 [inline]
__kmalloc_track_caller+0x13c/0x2c0 mm/slub.c:4959
kmalloc_reserve net/core/skbuff.c:357 [inline]
__alloc_skb+0x210/0x730 net/core/skbuff.c:428
alloc_skb include/linux/skbuff.h:1183 [inline]
netlink_alloc_large_skb net/netlink/af_netlink.c:1182 [inline]
netlink_sendmsg+0x611/0xb80 net/netlink/af_netlink.c:1898
sock_sendmsg_nosec net/socket.c:704 [inline]
__sock_sendmsg net/socket.c:716 [inline]
____sys_sendmsg+0x5be/0x8f0 net/socket.c:2436
___sys_sendmsg+0x236/0x2e0 net/socket.c:2490
__sys_sendmsg net/socket.c:2519 [inline]
__do_sys_sendmsg net/socket.c:2528 [inline]
__se_sys_sendmsg net/socket.c:2526 [inline]
__x64_sys_sendmsg+0x201/0x2d0 net/socket.c:2526
x64_sys_call+0x4b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Freed by task 882:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
kasan_slab_free include/linux/kasan.h:193 [inline]
slab_free_hook mm/slub.c:1728 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754
slab_free mm/slub.c:3526 [inline]
kfree+0xc4/0x270 mm/slub.c:4588
skb_free_head net/core/skbuff.c:656 [inline]
skb_release_data+0x7bd/0xa20 net/core/skbuff.c:678
skb_release_all net/core/skbuff.c:743 [inline]
__kfree_skb net/core/skbuff.c:757 [inline]
consume_skb+0xab/0x1f0 net/core/skbuff.c:934
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x874/0xa30 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x879/0xb80 net/netlink/af_netlink.c:1923
sock_sendmsg_nosec net/socket.c:704 [inline]
__sock_sendmsg net/socket.c:716 [inline]
____sys_sendmsg+0x5be/0x8f0 net/socket.c:2436
___sys_sendmsg+0x236/0x2e0 net/socket.c:2490
__sys_sendmsg net/socket.c:2519 [inline]
__do_sys_sendmsg net/socket.c:2528 [inline]
__se_sys_sendmsg net/socket.c:2526 [inline]
__x64_sys_sendmsg+0x201/0x2d0 net/socket.c:2526
x64_sys_call+0x4b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
The buggy address belongs to the object at ffff88812686e000
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 60 bytes inside of
1024-byte region [ffff88812686e000, ffff88812686e400)
The buggy address belongs to the page:
page:ffffea00049a1a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x126868
head:ffffea00049a1a00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 0000000400000001 ffff888100043080
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 1257, ts 62493303230, free_ts 53098495280
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2610
prep_new_page+0x1c/0x110 mm/page_alloc.c:2616
get_page_from_freelist+0x2d42/0x2dd0 mm/page_alloc.c:4492
__alloc_pages+0x1a2/0x460 mm/page_alloc.c:5829
alloc_slab_page mm/slub.c:-1 [inline]
allocate_slab mm/slub.c:1937 [inline]
new_slab+0xa0/0x4d0 mm/slub.c:2000
___slab_alloc+0x3ac/0x840 mm/slub.c:3033
__slab_alloc+0x49/0x90 mm/slub.c:3120
slab_alloc_node mm/slub.c:3211 [inline]
slab_alloc mm/slub.c:3255 [inline]
__kmalloc_track_caller+0x169/0x2c0 mm/slub.c:4954
kmalloc_reserve net/core/skbuff.c:357 [inline]
__alloc_skb+0x210/0x730 net/core/skbuff.c:428
alloc_skb include/linux/skbuff.h:1183 [inline]
alloc_uevent_skb+0x85/0x240 lib/kobject_uevent.c:290
uevent_net_broadcast_tagged lib/kobject_uevent.c:351 [inline]
kobject_uevent_net_broadcast+0x1a6/0x5a0 lib/kobject_uevent.c:412
kobject_uevent_env+0x52b/0x700 lib/kobject_uevent.c:608
kobject_uevent+0x1d/0x30 lib/kobject_uevent.c:657
rx_queue_add_kobject net/core/net-sysfs.c:1070 [inline]
net_rx_queue_update_kobjects+0x212/0x460 net/core/net-sysfs.c:1110
register_queue_kobjects net/core/net-sysfs.c:1767 [inline]
netdev_register_kobject+0x23d/0x330 net/core/net-sysfs.c:2018
register_netdevice+0xeaa/0x1490 net/core/dev.c:10432
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1477 [inline]
free_pcp_prepare mm/page_alloc.c:1549 [inline]
free_unref_page_prepare+0x5fa/0x600 mm/page_alloc.c:3540
free_unref_page+0xae/0x540 mm/page_alloc.c:3622
free_the_page mm/page_alloc.c:808 [inline]
__free_pages+0x6c/0x100 mm/page_alloc.c:5905
free_pages+0x82/0x90 mm/page_alloc.c:5916
kasan_depopulate_vmalloc_pte+0x6b/0x90 mm/kasan/shadow.c:354
apply_to_pte_range mm/memory.c:2645 [inline]
apply_to_pmd_range mm/memory.c:2689 [inline]
apply_to_pud_range mm/memory.c:2725 [inline]
apply_to_p4d_range mm/memory.c:2761 [inline]
__apply_to_page_range+0x8ca/0xc70 mm/memory.c:2797
apply_to_existing_page_range+0x38/0x50 mm/memory.c:2830
kasan_release_vmalloc+0x97/0xb0 mm/kasan/shadow.c:464
__purge_vmap_area_lazy+0xa8d/0x1890 mm/vmalloc.c:1723
_vm_unmap_aliases+0x2f1/0x370 mm/vmalloc.c:2126
vm_unmap_aliases+0x19/0x20 mm/vmalloc.c:2149
change_page_attr_set_clr+0x317/0xc30 arch/x86/mm/pat/set_memory.c:1740
change_page_attr_clear arch/x86/mm/pat/set_memory.c:1797 [inline]
set_memory_ro+0x89/0xd0 arch/x86/mm/pat/set_memory.c:1943
bpf_jit_binary_lock_ro include/linux/filter.h:919 [inline]
bpf_int_jit_compile+0xbf12/0xc4c0 arch/x86/net/bpf_jit_comp.c:2478
bpf_prog_select_runtime+0x6ea/0x9e0 kernel/bpf/core.c:1947
bpf_prog_load+0x10f4/0x1620 kernel/bpf/syscall.c:2332
Memory state around the buggy address:
ffff88812686df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88812686df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88812686e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88812686e080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88812686e100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
------------[ cut here ]------------
kobject: '' (ffff88812686e000): is not initialized, yet kobject_get() is being called.
WARNING: CPU: 1 PID: 2703 at lib/kobject.c:666 kobject_get+0x7c/0x120 lib/kobject.c:664
Modules linked in:
CPU: 0 PID: 2703 Comm: syz.7.726 Tainted: G B syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
RIP: 0010:kobject_get+0x7c/0x120 lib/kobject.c:664
Code: f9 fe 48 89 d8 48 c1 e8 03 42 80 3c 38 00 74 08 48 89 df e8 26 42 39 ff 48 8b 33 48 c7 c7 e0 d3 64 85 48 89 da e8 d4 1e 3c 02 <0f> 0b eb 0c e8 8b a7 f9 fe eb 4c e8 84 a7 f9 fe 4c 8d 73 38 4c 89
RSP: 0018:ffffc90000cd7a18 EFLAGS: 00010246
RAX: c49875d563037100 RBX: ffff88812686e000 RCX: 0000000000080000
RDX: ffffc90001da4000 RSI: 000000000007ffff RDI: 0000000000080000
RBP: ffffc90000cd7a30 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff5200019aea4 R12: 1ffff110227b0b0e
R13: dffffc0000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 00007f16506a56c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1651c9ac40 CR3: 0000000122fb6000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
get_device drivers/base/core.c:3518 [inline]
device_add+0x2f0/0xe90 drivers/base/core.c:3342
device_create_groups_vargs drivers/base/core.c:4118 [inline]
device_create+0x26c/0x300 drivers/base/core.c:4160
create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:31
create_alsa_device drivers/usb/gadget/function/f_midi.c:1262 [inline]
f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1303
try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline]
usb_get_function_instance+0xe2/0x2f0 drivers/usb/gadget/functions.c:44
function_make+0x118/0x350 drivers/usb/gadget/configfs.c:642
configfs_mkdir+0x50a/0x9c0 fs/configfs/dir.c:1356
vfs_mkdir+0x38b/0x590 fs/namei.c:4073
do_mkdirat+0x174/0x4d0 fs/namei.c:4098
__do_sys_mkdirat fs/namei.c:4113 [inline]
__se_sys_mkdirat fs/namei.c:4111 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4111
x64_sys_call+0x37e/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f1651c4d559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f16506a5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f1651ed3fa0 RCX: 00007f1651c4d559
RDX: 00000000000001ff RSI: 0000200000000b80 RDI: ffffffffffffff9c
RBP: 00007f1651ce4b20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1651ed4038 R14: 00007f1651ed3fa0 R15: 00007ffc2ebbf4d8
---[ end trace c84691f9fb8c76e5 ]---
------------[ cut here ]------------
kobject: '' (ffff88812686e000): is not initialized, yet kobject_get() is being called.
WARNING: CPU: 1 PID: 2703 at lib/kobject.c:666 kobject_get lib/kobject.c:664 [inline]
WARNING: CPU: 1 PID: 2703 at lib/kobject.c:666 kobject_add_internal+0x12e/0xde0 lib/kobject.c:248
Modules linked in:
CPU: 1 PID: 2703 Comm: syz.7.726 Tainted: G B W syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
RIP: 0010:kobject_get lib/kobject.c:664 [inline]
RIP: 0010:kobject_add_internal+0x12e/0xde0 lib/kobject.c:248
Code: b9 00 00 00 00 00 fc ff df 80 3c 08 00 74 08 4c 89 e7 e8 a5 29 39 ff 49 8b 34 24 48 c7 c7 e0 d3 64 85 4c 89 e2 e8 52 06 3c 02 <0f> 0b e9 04 01 00 00 e8 06 8f f9 fe b8 fe ff ff ff e9 b0 09 00 00
RSP: 0018:ffffc90000cd7898 EFLAGS: 00010246
RAX: c49875d563037100 RBX: ffff888123d30700 RCX: 0000000000080000
RDX: ffffc90001da4000 RSI: 000000000007ffff RDI: 0000000000080000
RBP: ffffc90000cd78f0 R08: ffffc90000cd7307 R09: 1ffff9200019ae60
R10: dffffc0000000000 R11: fffff5200019ae61 R12: ffff88812686e000
R13: ffff888123d30718 R14: 0000000000000000 R15: 1ffff110247a60e0
FS: 00007f16506a56c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fde675ce078 CR3: 0000000122fb6000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kobject_add_varg lib/kobject.c:398 [inline]
kobject_add+0x165/0x230 lib/kobject.c:450
class_dir_create_and_add drivers/base/core.c:2976 [inline]
get_device_parent+0x3a6/0x410 drivers/base/core.c:3031
device_add+0x308/0xe90 drivers/base/core.c:3343
device_create_groups_vargs drivers/base/core.c:4118 [inline]
device_create+0x26c/0x300 drivers/base/core.c:4160
create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:31
create_alsa_device drivers/usb/gadget/function/f_midi.c:1262 [inline]
f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1303
try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline]
usb_get_function_instance+0xe2/0x2f0 drivers/usb/gadget/functions.c:44
function_make+0x118/0x350 drivers/usb/gadget/configfs.c:642
configfs_mkdir+0x50a/0x9c0 fs/configfs/dir.c:1356
vfs_mkdir+0x38b/0x590 fs/namei.c:4073
do_mkdirat+0x174/0x4d0 fs/namei.c:4098
__do_sys_mkdirat fs/namei.c:4113 [inline]
__se_sys_mkdirat fs/namei.c:4111 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4111
x64_sys_call+0x37e/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f1651c4d559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f16506a5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f1651ed3fa0 RCX: 00007f1651c4d559
RDX: 00000000000001ff RSI: 0000200000000b80 RDI: ffffffffffffff9c
RBP: 00007f1651ce4b20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1651ed4038 R14: 00007f1651ed3fa0 R15: 00007ffc2ebbf4d8
---[ end trace c84691f9fb8c76e6 ]---
general protection fault, probably for non-canonical address 0xee47a5c9e92a886c: 0000 [#1] PREEMPT SMP KASAN
KASAN: maybe wild-memory-access in range [0x723d4e4f49544360-0x723d4e4f49544367]
CPU: 1 PID: 2703 Comm: syz.7.726 Tainted: G B W syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
RIP: 0010:kobj_child_ns_ops lib/kobject.c:1084 [inline]
RIP: 0010:kobj_ns_ops lib/kobject.c:1092 [inline]
RIP: 0010:kobject_namespace lib/kobject.c:30 [inline]
RIP: 0010:create_dir lib/kobject.c:89 [inline]
RIP: 0010:kobject_add_internal+0x5e3/0xde0 lib/kobject.c:263
Code: 4c 89 e7 e8 ff 24 39 ff 4d 8b 24 24 4d 85 e4 0f 84 db 00 00 00 49 83 c4 20 4c 89 e0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 4c 89 e7 e8 cf 24 39 ff 49 8b 04 24 48 85 c0 0f
RSP: 0018:ffffc90000cd7898 EFLAGS: 00010206
RAX: 0e47a9c9e92a886c RBX: ffff888123d30700 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88812686e028
RBP: ffffc90000cd78f0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff5200019af04 R12: 723d4e4f49544361
R13: ffff888123d30718 R14: ffffffff86a49cc0 R15: ffff88812686e000
FS: 00007f16506a56c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f878ee85e80 CR3: 0000000122fb6000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kobject_add_varg lib/kobject.c:398 [inline]
kobject_add+0x165/0x230 lib/kobject.c:450
class_dir_create_and_add drivers/base/core.c:2976 [inline]
get_device_parent+0x3a6/0x410 drivers/base/core.c:3031
device_add+0x308/0xe90 drivers/base/core.c:3343
device_create_groups_vargs drivers/base/core.c:4118 [inline]
device_create+0x26c/0x300 drivers/base/core.c:4160
create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:31
create_alsa_device drivers/usb/gadget/function/f_midi.c:1262 [inline]
f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1303
try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline]
usb_get_function_instance+0xe2/0x2f0 drivers/usb/gadget/functions.c:44
function_make+0x118/0x350 drivers/usb/gadget/configfs.c:642
configfs_mkdir+0x50a/0x9c0 fs/configfs/dir.c:1356
vfs_mkdir+0x38b/0x590 fs/namei.c:4073
do_mkdirat+0x174/0x4d0 fs/namei.c:4098
__do_sys_mkdirat fs/namei.c:4113 [inline]
__se_sys_mkdirat fs/namei.c:4111 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4111
x64_sys_call+0x37e/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f1651c4d559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f16506a5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f1651ed3fa0 RCX: 00007f1651c4d559
RDX: 00000000000001ff RSI: 0000200000000b80 RDI: ffffffffffffff9c
RBP: 00007f1651ce4b20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1651ed4038 R14: 00007f1651ed3fa0 R15: 00007ffc2ebbf4d8
Modules linked in:
---[ end trace c84691f9fb8c76e7 ]---
RIP: 0010:kobj_child_ns_ops lib/kobject.c:1084 [inline]
RIP: 0010:kobj_ns_ops lib/kobject.c:1092 [inline]
RIP: 0010:kobject_namespace lib/kobject.c:30 [inline]
RIP: 0010:create_dir lib/kobject.c:89 [inline]
RIP: 0010:kobject_add_internal+0x5e3/0xde0 lib/kobject.c:263
Code: 4c 89 e7 e8 ff 24 39 ff 4d 8b 24 24 4d 85 e4 0f 84 db 00 00 00 49 83 c4 20 4c 89 e0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 4c 89 e7 e8 cf 24 39 ff 49 8b 04 24 48 85 c0 0f
RSP: 0018:ffffc90000cd7898 EFLAGS: 00010206
RAX: 0e47a9c9e92a886c RBX: ffff888123d30700 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88812686e028
RBP: ffffc90000cd78f0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff5200019af04 R12: 723d4e4f49544361
R13: ffff888123d30718 R14: ffffffff86a49cc0 R15: ffff88812686e000
FS: 00007f16506a56c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6bd08b32f8 CR3: 0000000122fb6000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 4c 89 e7 mov %r12,%rdi
3: e8 ff 24 39 ff call 0xff392507
8: 4d 8b 24 24 mov (%r12),%r12
c: 4d 85 e4 test %r12,%r12
f: 0f 84 db 00 00 00 je 0xf0
15: 49 83 c4 20 add $0x20,%r12
19: 4c 89 e0 mov %r12,%rax
1c: 48 c1 e8 03 shr $0x3,%rax
20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx
27: fc ff df
* 2a: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) <-- trapping instruction
2e: 74 08 je 0x38
30: 4c 89 e7 mov %r12,%rdi
33: e8 cf 24 39 ff call 0xff392507
38: 49 8b 04 24 mov (%r12),%rax
3c: 48 85 c0 test %rax,%rax
3f: 0f .byte 0xf