================================================================== BUG: KCSAN: data-race in __kernfs_remove / cleanup_glue_dir read-write to 0xffff888140d184c0 of 8 bytes by task 21732 on cpu 0: kernfs_unlink_sibling fs/kernfs/dir.c:396 [inline] __kernfs_remove+0x587/0x6a0 fs/kernfs/dir.c:1330 kernfs_remove+0x1d/0x30 fs/kernfs/dir.c:1356 sysfs_remove_dir+0x7a/0x90 fs/sysfs/dir.c:102 __kobject_del lib/kobject.c:620 [inline] kobject_del+0xb7/0x100 lib/kobject.c:643 device_del+0x875/0x8f0 drivers/base/core.c:3282 device_unregister drivers/base/core.c:3303 [inline] device_destroy+0x63/0xa0 drivers/base/core.c:3849 tty_unregister_device+0x4e/0xd0 drivers/tty/tty_io.c:3197 gsmld_detach_gsm drivers/tty/n_gsm.c:2409 [inline] gsmld_close+0x6c/0x140 drivers/tty/n_gsm.c:2478 tty_ldisc_close drivers/tty/tty_ldisc.c:488 [inline] tty_ldisc_kill drivers/tty/tty_ldisc.c:636 [inline] tty_ldisc_release+0x1b6/0x400 drivers/tty/tty_ldisc.c:809 tty_release_struct+0x19/0xb0 drivers/tty/tty_io.c:1618 tty_release+0x97b/0x9f0 drivers/tty/tty_io.c:1789 __fput+0x24b/0x4e0 fs/file_table.c:280 ____fput+0x11/0x20 fs/file_table.c:313 task_work_run+0x8e/0x110 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x16b/0x1a0 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:302 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x44/0xa9 read to 0xffff888140d184c0 of 8 bytes by task 21636 on cpu 1: kobject_has_children include/linux/kobject.h:135 [inline] cleanup_glue_dir+0xce/0x140 drivers/base/core.c:2790 device_del+0x880/0x8f0 drivers/base/core.c:3283 device_unregister drivers/base/core.c:3303 [inline] device_destroy+0x63/0xa0 drivers/base/core.c:3849 tty_unregister_device+0x4e/0xd0 drivers/tty/tty_io.c:3197 gsmld_detach_gsm drivers/tty/n_gsm.c:2409 [inline] gsmld_close+0x6c/0x140 drivers/tty/n_gsm.c:2478 tty_ldisc_close drivers/tty/tty_ldisc.c:488 [inline] tty_ldisc_kill drivers/tty/tty_ldisc.c:636 [inline] tty_ldisc_release+0x1b6/0x400 drivers/tty/tty_ldisc.c:809 tty_release_struct+0x19/0xb0 drivers/tty/tty_io.c:1618 tty_release+0x97b/0x9f0 drivers/tty/tty_io.c:1789 __fput+0x24b/0x4e0 fs/file_table.c:280 ____fput+0x11/0x20 fs/file_table.c:313 task_work_run+0x8e/0x110 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x16b/0x1a0 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:302 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 21636 Comm: syz-executor.5 Not tainted 5.10.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ==================================================================