syzbot


KCSAN: data-race in event_sched_in / perf_mmap (2)

Status: auto-closed as invalid on 2022/03/21 20:07
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 291d, last: 291d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in event_sched_in / perf_mmap 1 385d 379d 0/24 auto-closed as invalid on 2021/12/17 06:55
upstream KCSAN: data-race in event_sched_in / perf_mmap (3) 1 242d 242d 0/24 auto-closed as invalid on 2022/05/09 23:29

Sample crash report:
==================================================================
BUG: KCSAN: data-race in event_sched_in / perf_mmap

write to 0xffff88814074a0c0 of 8 bytes by task 10274 on cpu 0:
 perf_event_update_time kernel/events/core.c:647 [inline]
 perf_event_set_state kernel/events/core.c:666 [inline]
 event_sched_in+0x1c5/0xe60 kernel/events/core.c:2585
 group_sched_in kernel/events/core.c:2637 [inline]
 merge_sched_in kernel/events/core.c:3818 [inline]
 visit_groups_merge+0x943/0x1a50 kernel/events/core.c:3762
 ctx_flexible_sched_in kernel/events/core.c:3860 [inline]
 ctx_sched_in+0x221/0x240 kernel/events/core.c:3908
 perf_event_sched_in kernel/events/core.c:2741 [inline]
 perf_event_context_sched_in kernel/events/core.c:3959 [inline]
 __perf_event_task_sched_in+0x37c/0x8d0 kernel/events/core.c:4002
 perf_event_task_sched_in include/linux/perf_event.h:1213 [inline]
 finish_task_switch+0x1ef/0x280 kernel/sched/core.c:4862
 context_switch kernel/sched/core.c:4990 [inline]
 __schedule+0x43a/0x690 kernel/sched/core.c:6296
 schedule+0x81/0xb0 kernel/sched/core.c:6369
 rwsem_down_write_slowpath kernel/locking/rwsem.c:1142 [inline]
 __down_write_common+0x448/0x7b0 kernel/locking/rwsem.c:1259
 __down_write_killable kernel/locking/rwsem.c:1273 [inline]
 down_write_killable+0x16/0x30 kernel/locking/rwsem.c:1527
 mmap_write_lock_killable include/linux/mmap_lock.h:87 [inline]
 vm_mmap_pgoff+0xc9/0x1f0 mm/util.c:517
 ksys_mmap_pgoff+0x265/0x320 mm/mmap.c:1630
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88814074a0c0 of 8 bytes by task 10273 on cpu 1:
 __perf_update_times kernel/events/core.c:634 [inline]
 perf_event_update_time kernel/events/core.c:647 [inline]
 perf_mmap+0xbee/0xeb0 kernel/events/core.c:6433
 call_mmap include/linux/fs.h:2079 [inline]
 mmap_region+0xb04/0x10b0 mm/mmap.c:1793
 do_mmap+0x781/0xc20 mm/mmap.c:1582
 vm_mmap_pgoff+0x117/0x1f0 mm/util.c:519
 ksys_mmap_pgoff+0x265/0x320 mm/mmap.c:1630
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x000000000003d2f3 -> 0x0000000000041238

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

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/02/14 20:05 upstream 754e0b0e3560 8b9ca619 .config log report info KCSAN: data-race in event_sched_in / perf_mmap
* Struck through repros no longer work on HEAD.