syzbot


KCSAN: data-race in inotify_one_event / inotify_remove_from_idr (2)

Status: auto-closed as invalid on 2020/12/29 17:12
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+70294d62bfbf1b70a5d6@syzkaller.appspotmail.com
First crash: 1811d, last: 1782d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in inotify_one_event / inotify_remove_from_idr fs 6 3 1846d 1881d 0/29 auto-closed as invalid on 2020/10/26 03:38

Sample crash report:
==================================================================
BUG: KCSAN: data-race in inotify_one_event / inotify_remove_from_idr

write to 0xffff8880343a3048 of 4 bytes by task 1870 on cpu 0:
 inotify_remove_from_idr+0x15b/0x310 fs/notify/inotify/inotify_user.c:475
 inotify_ignored_and_remove_idr+0x69/0xb0 fs/notify/inotify/inotify_user.c:500
 inotify_freeing_mark+0x19/0x20 fs/notify/inotify/inotify_fsnotify.c:167
 fsnotify_free_mark fs/notify/mark.c:427 [inline]
 fsnotify_clear_marks_by_group+0x330/0x3e0 fs/notify/mark.c:763
 fsnotify_destroy_group+0x51/0x170 fs/notify/group.c:61
 inotify_release+0x21/0x30 fs/notify/inotify/inotify_user.c:273
 __fput+0x243/0x4d0 fs/file_table.c:281
 ____fput+0x11/0x20 fs/file_table.c:314
 task_work_run+0x8e/0x110 kernel/task_work.c:151
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:164 [inline]
 exit_to_user_mode_prepare+0x13c/0x170 kernel/entry/common.c:191
 syscall_exit_to_user_mode+0x16/0x30 kernel/entry/common.c:266
 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880343a3048 of 4 bytes by task 1875 on cpu 1:
 inotify_one_event+0x21b/0x350 fs/notify/inotify/inotify_fsnotify.c:116
 inotify_handle_event+0x103/0x190 fs/notify/inotify/inotify_fsnotify.c:157
 send_to_group fs/notify/fsnotify.c:324 [inline]
 fsnotify+0xa95/0xe70 fs/notify/fsnotify.c:506
 __fsnotify_parent+0x3ac/0x430 fs/notify/fsnotify.c:225
 fsnotify_parent include/linux/fsnotify.h:68 [inline]
 fsnotify_file include/linux/fsnotify.h:90 [inline]
 fsnotify_modify include/linux/fsnotify.h:255 [inline]
 do_iter_write+0x432/0x4b0 fs/read_write.c:870
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x42a/0x780 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:933
 splice_direct_to_actor+0x345/0x650 fs/splice.c:888
 do_splice_direct+0xf5/0x170 fs/splice.c:976
 do_sendfile+0x5db/0xca0 fs/read_write.c:1257
 __do_sys_sendfile64 fs/read_write.c:1312 [inline]
 __se_sys_sendfile64 fs/read_write.c:1304 [inline]
 __x64_sys_sendfile64+0xa9/0x130 fs/read_write.c:1304
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1875 Comm: syz-executor.3 Not tainted 5.10.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/11/24 17:12 upstream d5beb3140f91 e34b696c .config console log report info ci2-upstream-kcsan-gce
2020/11/17 11:52 upstream 9c87c9f41245 bd2a760b .config console log report info ci2-upstream-kcsan-gce
2020/11/10 23:16 upstream eccc87672492 cca87986 .config console log report info ci2-upstream-kcsan-gce
2020/10/30 18:14 upstream 07e088730245 a6e3ac3b .config console log report info ci2-upstream-kcsan-gce
2020/10/26 23:54 upstream 41ba50b0572e 8b3eaf58 .config console log report info ci2-upstream-kcsan-gce
2020/10/26 05:14 upstream 986b9eacb259 a1839e81 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.