syzbot


KCSAN: data-race in __kernfs_remove / cleanup_glue_dir (7)

Status: auto-closed as invalid on 2022/08/08 13:27
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 155d, last: 155d
similar bugs (6):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __kernfs_remove / cleanup_glue_dir 2 808d 826d 0/24 auto-closed as invalid on 2020/10/24 11:06
upstream KCSAN: data-race in __kernfs_remove / cleanup_glue_dir (4) 1 607d 607d 0/24 auto-closed as invalid on 2021/05/13 08:58
upstream KCSAN: data-race in __kernfs_remove / cleanup_glue_dir (6) 3 237d 265d 0/24 auto-closed as invalid on 2022/05/18 10:42
upstream KCSAN: data-race in __kernfs_remove / cleanup_glue_dir (2) 2 712d 725d 0/24 auto-closed as invalid on 2021/01/28 08:27
upstream KCSAN: data-race in __kernfs_remove / cleanup_glue_dir (5) 1 412d 412d 0/24 auto-closed as invalid on 2021/11/24 14:49
upstream KCSAN: data-race in __kernfs_remove / cleanup_glue_dir (3) 1 676d 676d 0/24 auto-closed as invalid on 2021/03/05 09:25

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __kernfs_remove / cleanup_glue_dir

read-write to 0xffff888135fc9540 of 8 bytes by task 7986 on cpu 0:
 kernfs_unlink_sibling fs/kernfs/dir.c:404 [inline]
 __kernfs_remove+0x589/0x6b0 fs/kernfs/dir.c:1391
 kernfs_remove+0x4a/0x60 fs/kernfs/dir.c:1424
 sysfs_remove_dir+0x7a/0x90 fs/sysfs/dir.c:101
 __kobject_del+0x9d/0x1a0 lib/kobject.c:588
 kobject_del+0x2a/0x40 lib/kobject.c:611
 device_del+0x845/0x8c0 drivers/base/core.c:3615
 device_unregister+0x11/0x30 drivers/base/core.c:3636
 wakeup_source_sysfs_remove+0x21/0x30 drivers/base/power/wakeup_stats.c:208
 wakeup_source_unregister+0xea/0x110 drivers/base/power/wakeup.c:249
 ep_free+0x1f8/0x210 fs/eventpoll.c:786
 ep_eventpoll_release+0x2e/0x40 fs/eventpoll.c:795
 __fput+0x292/0x510 fs/file_table.c:317
 ____fput+0x11/0x20 fs/file_table.c:350
 task_work_run+0x8e/0x110 kernel/task_work.c:177
 get_signal+0xeca/0x1020 kernel/signal.c:2634
 arch_do_signal_or_restart+0x87/0x2d0 arch/x86/kernel/signal.c:869
 exit_to_user_mode_loop+0x78/0x130 kernel/entry/common.c:166
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

read to 0xffff888135fc9540 of 8 bytes by task 7987 on cpu 1:
 kobject_has_children drivers/base/core.c:3052 [inline]
 cleanup_glue_dir+0xcb/0x140 drivers/base/core.c:3118
 device_del+0x850/0x8c0 drivers/base/core.c:3616
 device_unregister+0x11/0x30 drivers/base/core.c:3636
 wakeup_source_sysfs_remove+0x21/0x30 drivers/base/power/wakeup_stats.c:208
 wakeup_source_unregister+0xea/0x110 drivers/base/power/wakeup.c:249
 ep_remove+0x2b2/0x360 fs/eventpoll.c:723
 eventpoll_release_file+0x92/0xd0 fs/eventpoll.c:930
 eventpoll_release include/linux/eventpoll.h:53 [inline]
 __fput+0x499/0x510 fs/file_table.c:308
 ____fput+0x11/0x20 fs/file_table.c:350
 task_work_run+0x8e/0x110 kernel/task_work.c:177
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0x124/0x130 kernel/entry/common.c:169
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

value changed: 0x0000000000000008 -> 0x0000000000000007

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 7987 Comm: syz-executor.2 Not tainted 5.19.0-rc5-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/07/04 13:21 upstream 88084a3df167 bff65f44 .config log report info KCSAN: data-race in __kernfs_remove / cleanup_glue_dir
* Struck through repros no longer work on HEAD.