syzbot


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

Status: auto-closed as invalid on 2022/05/18 10:42
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 262d, last: 234d
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 805d 822d 0/24 auto-closed as invalid on 2020/10/24 11:06
upstream KCSAN: data-race in __kernfs_remove / cleanup_glue_dir (4) 1 604d 604d 0/24 auto-closed as invalid on 2021/05/13 08:58
upstream KCSAN: data-race in __kernfs_remove / cleanup_glue_dir (2) 2 709d 722d 0/24 auto-closed as invalid on 2021/01/28 08:27
upstream KCSAN: data-race in __kernfs_remove / cleanup_glue_dir (7) 1 151d 151d 0/24 auto-closed as invalid on 2022/08/08 13:27
upstream KCSAN: data-race in __kernfs_remove / cleanup_glue_dir (5) 1 408d 408d 0/24 auto-closed as invalid on 2021/11/24 14:49
upstream KCSAN: data-race in __kernfs_remove / cleanup_glue_dir (3) 1 673d 673d 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 0xffff88812245e9c0 of 8 bytes by task 4250 on cpu 1:
 kernfs_unlink_sibling fs/kernfs/dir.c:396 [inline]
 __kernfs_remove+0x589/0x6b0 fs/kernfs/dir.c:1384
 kernfs_remove+0x40/0x50 fs/kernfs/dir.c:1412
 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:3603
 device_unregister+0x11/0x30 drivers/base/core.c:3624
 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
 ep_free+0x18b/0x210 fs/eventpoll.c:778
 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:164
 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+0x44/0xae

read to 0xffff88812245e9c0 of 8 bytes by task 4251 on cpu 0:
 kobject_has_children drivers/base/core.c:3040 [inline]
 cleanup_glue_dir+0xcb/0x140 drivers/base/core.c:3106
 device_del+0x850/0x8c0 drivers/base/core.c:3604
 device_unregister+0x11/0x30 drivers/base/core.c:3624
 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:164
 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+0x44/0xae

value changed: 0x0000000000000004 -> 0x0000000000000003

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 4251 Comm: syz-executor.0 Not tainted 5.18.0-rc2-syzkaller-00050-ga19944809fe9-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/04/13 10:41 upstream a19944809fe9 b17b2923 .config log report info KCSAN: data-race in __kernfs_remove / cleanup_glue_dir
ci2-upstream-kcsan-gce 2022/04/07 22:42 upstream 42e7a03d3bad c6ff3e05 .config log report info KCSAN: data-race in __kernfs_remove / cleanup_glue_dir
ci2-upstream-kcsan-gce 2022/03/15 18:40 upstream 56e337f2cf13 9e8eaa75 .config log report info KCSAN: data-race in __kernfs_remove / cleanup_glue_dir
* Struck through repros no longer work on HEAD.