sysfs: cannot create duplicate filename '/devices/virtual/net/vcan10000000000' ================================================================== BUG: KCSAN: data-race in data_push_tail / vsnprintf write to 0xffffffff86ec22ec of 1 bytes by task 28684 on cpu 1: vsnprintf+0xdd0/0xe20 va_format lib/vsprintf.c:1683 [inline] pointer+0x8a1/0xd10 lib/vsprintf.c:2450 vsnprintf+0x861/0xe20 lib/vsprintf.c:2823 vscnprintf+0x42/0x80 lib/vsprintf.c:2925 printk_sprint+0x30/0x2d0 kernel/printk/printk.c:2124 vprintk_store+0x56f/0x800 kernel/printk/printk.c:2238 vprintk_emit+0xd0/0x5d0 kernel/printk/printk.c:2284 vprintk_default+0x26/0x30 kernel/printk/printk.c:2318 vprintk+0x71/0x80 kernel/printk/printk_safe.c:45 _printk+0x7a/0xa0 kernel/printk/printk.c:2328 __ext4_msg+0x18a/0x1a0 fs/ext4/super.c:1006 ext4_setup_super+0x1e0/0x560 __ext4_fill_super fs/ext4/super.c:5502 [inline] ext4_fill_super+0x3051/0x39a0 fs/ext4/super.c:5711 get_tree_bdev+0x272/0x300 fs/super.c:1598 ext4_get_tree+0x1c/0x20 fs/ext4/super.c:5743 vfs_get_tree+0x51/0x1b0 fs/super.c:1771 do_new_mount+0x203/0x660 fs/namespace.c:3337 path_mount+0x496/0xb30 fs/namespace.c:3664 do_mount fs/namespace.c:3677 [inline] __do_sys_mount fs/namespace.c:3886 [inline] __se_sys_mount+0x27f/0x2d0 fs/namespace.c:3863 __x64_sys_mount+0x67/0x80 fs/namespace.c:3863 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b read to 0xffffffff86ec22e8 of 8 bytes by task 28702 on cpu 0: data_make_reusable kernel/printk/printk_ringbuffer.c:590 [inline] data_push_tail+0x102/0x430 kernel/printk/printk_ringbuffer.c:675 data_alloc+0xbe/0x2c0 kernel/printk/printk_ringbuffer.c:1046 prb_reserve+0x893/0xbc0 kernel/printk/printk_ringbuffer.c:1555 vprintk_store+0x53e/0x800 kernel/printk/printk.c:2228 vprintk_emit+0xd0/0x5d0 kernel/printk/printk.c:2284 vprintk_default+0x26/0x30 kernel/printk/printk.c:2318 vprintk+0x71/0x80 kernel/printk/printk_safe.c:45 _printk+0x7a/0xa0 kernel/printk/printk.c:2328 sysfs_warn_dup fs/sysfs/dir.c:29 [inline] sysfs_create_dir_ns+0x1a3/0x1d0 fs/sysfs/dir.c:63 create_dir lib/kobject.c:73 [inline] kobject_add_internal+0x3eb/0x730 lib/kobject.c:238 kobject_add_varg lib/kobject.c:372 [inline] kobject_add+0xdc/0x150 lib/kobject.c:424 device_add+0x2f8/0x8b0 drivers/base/core.c:3563 netdev_register_kobject+0xfc/0x230 net/core/net-sysfs.c:2044 register_netdevice+0x65b/0xb20 net/core/dev.c:10164 rtnl_newlink_create net/core/rtnetlink.c:3523 [inline] __rtnl_newlink net/core/rtnetlink.c:3741 [inline] rtnl_newlink+0x103d/0x1670 net/core/rtnetlink.c:3754 rtnetlink_rcv_msg+0x807/0x8c0 net/core/rtnetlink.c:6558 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2545 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6576 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x589/0x650 net/netlink/af_netlink.c:1368 netlink_sendmsg+0x66e/0x770 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x37c/0x4d0 net/socket.c:2588 ___sys_sendmsg net/socket.c:2642 [inline] __sys_sendmsg+0x1e9/0x270 net/socket.c:2671 __do_sys_sendmsg net/socket.c:2680 [inline] __se_sys_sendmsg net/socket.c:2678 [inline] __x64_sys_sendmsg+0x46/0x50 net/socket.c:2678 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b value changed: 0x00000001000047cb -> 0x000000016465646e Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 28702 Comm: syz-executor.4 Not tainted 6.6.0-syzkaller-14500-g1c41041124bd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 ================================================================== CPU: 0 PID: 28702 Comm: syz-executor.4 Not tainted 6.6.0-syzkaller-14500-g1c41041124bd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xda/0x130 lib/dump_stack.c:106 dump_stack+0x15/0x20 lib/dump_stack.c:113 sysfs_warn_dup fs/sysfs/dir.c:30 [inline] sysfs_create_dir_ns+0x1a8/0x1d0 fs/sysfs/dir.c:63 create_dir lib/kobject.c:73 [inline] kobject_add_internal+0x3eb/0x730 lib/kobject.c:238 kobject_add_varg lib/kobject.c:372 [inline] kobject_add+0xdc/0x150 lib/kobject.c:424 device_add+0x2f8/0x8b0 drivers/base/core.c:3563 netdev_register_kobject+0xfc/0x230 net/core/net-sysfs.c:2044 register_netdevice+0x65b/0xb20 net/core/dev.c:10164 rtnl_newlink_create net/core/rtnetlink.c:3523 [inline] __rtnl_newlink net/core/rtnetlink.c:3741 [inline] rtnl_newlink+0x103d/0x1670 net/core/rtnetlink.c:3754 rtnetlink_rcv_msg+0x807/0x8c0 net/core/rtnetlink.c:6558 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2545 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6576 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x589/0x650 net/netlink/af_netlink.c:1368 netlink_sendmsg+0x66e/0x770 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x37c/0x4d0 net/socket.c:2588 ___sys_sendmsg net/socket.c:2642 [inline] __sys_sendmsg+0x1e9/0x270 net/socket.c:2671 __do_sys_sendmsg net/socket.c:2680 [inline] __se_sys_sendmsg net/socket.c:2678 [inline] __x64_sys_sendmsg+0x46/0x50 net/socket.c:2678 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f6c4c1d3ae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6c4b5560c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f6c4c2f2f80 RCX: 00007f6c4c1d3ae9 RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000004 RBP: 00007f6c4c21f47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f6c4c2f2f80 R15: 00007ffc1a45b3b8 kobject: kobject_add_internal failed for vcan10000000000 with -EEXIST, don't try to register things with the same name in the same directory. syz-executor.4 (28702) used greatest stack depth: 8952 bytes left