================================================================== BUG: KCSAN: data-race in kernfs_iop_permission / kernfs_link_sibling read-write to 0xffff88814e13e840 of 8 bytes by task 27930 on cpu 0: kernfs_link_sibling+0x1e7/0x230 fs/kernfs/dir.c:387 kernfs_add_one+0x260/0x390 fs/kernfs/dir.c:770 kernfs_create_dir_ns+0x100/0x150 fs/kernfs/dir.c:1046 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:367 [inline] kobject_init_and_add+0x15e/0x200 lib/kobject.c:450 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:10051 ldisc_open+0x318/0x500 drivers/net/caif/caif_serial.c:351 tty_ldisc_open drivers/tty/tty_ldisc.c:432 [inline] tty_set_ldisc+0x299/0x490 drivers/tty/tty_ldisc.c:557 tiocsetd+0x52/0x60 drivers/tty/tty_io.c:2441 tty_ioctl+0xa87/0xbc0 drivers/tty/tty_io.c:2722 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xcf/0x140 fs/ioctl.c:856 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:856 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 0xffff88814e13e840 of 8 bytes by task 26018 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+0x1a1/0x1d10 fs/namei.c:3789 do_filp_open+0xf6/0x200 fs/namei.c:3820 do_sys_openat2+0xab/0x110 fs/open.c:1407 do_sys_open fs/open.c:1422 [inline] __do_sys_openat fs/open.c:1438 [inline] __se_sys_openat fs/open.c:1433 [inline] __x64_sys_openat+0xf3/0x120 fs/open.c:1433 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: 0x0000000000000001 -> 0x0000000000000002 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 26018 Comm: udevd Not tainted 6.5.0-rc3-syzkaller-00018-g0b5547c51827 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 ================================================================== udevd[26018]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory