================================================================== BUG: KCSAN: data-race in kernfs_iop_permission / kernfs_link_sibling read-write to 0xffff888100ce83c0 of 8 bytes by task 23619 on cpu 1: 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_add+0xdc/0x150 lib/kobject.c:419 device_add+0x2ff/0xab0 drivers/base/core.c:3563 device_create_groups_vargs drivers/base/core.c:4302 [inline] device_create+0x181/0x1d0 drivers/base/core.c:4341 vcs_make_sysfs+0xa1/0xb0 drivers/tty/vt/vc_screen.c:797 vc_allocate+0x402/0x430 drivers/tty/vt/vt.c:1107 con_install+0x36/0x2d0 drivers/tty/vt/vt.c:3333 tty_driver_install_tty drivers/tty/tty_io.c:1312 [inline] tty_init_dev+0x7a/0x320 drivers/tty/tty_io.c:1424 tty_open_by_driver drivers/tty/tty_io.c:2090 [inline] tty_open+0x6c9/0xb00 drivers/tty/tty_io.c:2137 chrdev_open+0x34f/0x3c0 fs/char_dev.c:414 do_dentry_open+0x5cd/0xaf0 fs/open.c:914 vfs_open+0x4a/0x50 fs/open.c:1048 do_open fs/namei.c:3636 [inline] path_openat+0x17f2/0x1d10 fs/namei.c:3793 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 read to 0xffff888100ce83c0 of 8 bytes by task 23590 on cpu 0: 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: 0x0000000000000011 -> 0x0000000000000012 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 23590 Comm: udevd Not tainted 6.5.0-rc2-syzkaller-00338-g295e1388de2d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 ==================================================================