================================================================== BUG: KCSAN: data-race in kernfs_iop_permission / kernfs_link_sibling read-write to 0xffff88812f88c7c0 of 8 bytes by task 7683 on cpu 0: kernfs_link_sibling+0x1e7/0x230 fs/kernfs/dir.c:387 kernfs_add_one+0x260/0x390 fs/kernfs/dir.c:768 kernfs_create_dir_ns+0x100/0x150 fs/kernfs/dir.c:1044 sysfs_create_dir_ns+0xd7/0x1d0 fs/sysfs/dir.c:59 create_dir lib/kobject.c:65 [inline] kobject_add_internal+0x47b/0x780 lib/kobject.c:233 kobject_add_varg lib/kobject.c:368 [inline] kobject_init_and_add+0x15e/0x200 lib/kobject.c:451 netdev_queue_add_kobject net/core/net-sysfs.c:1694 [inline] netdev_queue_update_kobjects+0x16b/0x350 net/core/net-sysfs.c:1746 register_queue_kobjects net/core/net-sysfs.c:1807 [inline] netdev_register_kobject+0x1b9/0x230 net/core/net-sysfs.c:2047 register_netdevice+0x903/0xcd0 net/core/dev.c:10087 veth_newlink+0x5c4/0x840 drivers/net/veth.c:1928 rtnl_newlink_create net/core/rtnetlink.c:3465 [inline] __rtnl_newlink net/core/rtnetlink.c:3682 [inline] rtnl_newlink+0xe5a/0x15a0 net/core/rtnetlink.c:3695 rtnetlink_rcv_msg+0x807/0x8c0 net/core/rtnetlink.c:6417 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2546 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6435 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x56f/0x640 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x665/0x770 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] __sys_sendto+0x246/0x300 net/socket.c:2144 __do_sys_sendto net/socket.c:2156 [inline] __se_sys_sendto net/socket.c:2152 [inline] __x64_sys_sendto+0x78/0x90 net/socket.c:2152 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff88812f88c7c0 of 8 bytes by task 3934 on cpu 1: kernfs_refresh_inode fs/kernfs/inode.c:181 [inline] kernfs_iop_permission+0x165/0x1b0 fs/kernfs/inode.c:289 do_inode_permission fs/namei.c:461 [inline] inode_permission+0x184/0x300 fs/namei.c:528 may_lookup fs/namei.c:1720 [inline] link_path_walk+0x19e/0x7e0 fs/namei.c:2267 path_openat+0x19b/0x1d00 fs/namei.c:3787 do_filp_open+0xf6/0x200 fs/namei.c:3818 do_sys_openat2+0xb5/0x2a0 fs/open.c:1356 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __x64_sys_openat+0xf3/0x120 fs/open.c:1383 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x0000000000000003 -> 0x0000000000000004 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 3934 Comm: udevd Not tainted 6.4.0-rc7-syzkaller-00072-gdad9774deaf1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 ==================================================================