syzbot


KCSAN: data-race in __se_sys_perf_event_open / find_get_context

Status: fixed on 2021/11/10 00:50
Subsystems: perf
[Documentation on labels]
Reported-by: syzbot+c611b5beb8dec04ff9b2@syzkaller.appspotmail.com
Fix commit: 6c605f837115 perf: Fix data race between pin_count increment/decrement
First crash: 1315d, last: 1276d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 5.12 000/173] 5.12.11-rc1 review 180 (180) 2021/06/15 14:21
[PATCH 5.4 00/84] 5.4.126-rc1 review 91 (91) 2021/06/15 14:20
[PATCH 4.19 00/67] 4.19.195-rc1 review 74 (74) 2021/06/15 14:20
[PATCH 4.14 00/49] 4.14.237-rc1 review 53 (53) 2021/06/15 14:20
[PATCH 4.4 00/34] 4.4.273-rc1 review 39 (39) 2021/06/15 14:19
[PATCH 4.9 00/42] 4.9.273-rc1 review 47 (47) 2021/06/15 06:07
[PATCH 5.10 000/131] 5.10.44-rc1 review 140 (140) 2021/06/15 01:19
[PATCH] perf: Fix data race between pin_count increment/decrement 3 (3) 2021/05/31 10:40

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __se_sys_perf_event_open / find_get_context

write to 0xffff888237c2d520 of 4 bytes by task 4144 on cpu 0:
 find_get_context+0x310/0x5c0 kernel/events/core.c:4612
 __do_sys_perf_event_open kernel/events/core.c:12085 [inline]
 __se_sys_perf_event_open+0x85e/0x2740 kernel/events/core.c:11921
 __x64_sys_perf_event_open+0x63/0x70 kernel/events/core.c:11921
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888237c2d520 of 4 bytes by task 4145 on cpu 1:
 perf_unpin_context kernel/events/core.c:1520 [inline]
 __do_sys_perf_event_open kernel/events/core.c:12316 [inline]
 __se_sys_perf_event_open+0x1be2/0x2740 kernel/events/core.c:11921
 __x64_sys_perf_event_open+0x63/0x70 kernel/events/core.c:11921
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000001 -> 0x00000002

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

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/06/07 23:07 upstream 614124bea77e b718257f .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __se_sys_perf_event_open / find_get_context
2021/05/24 18:58 upstream c4681547bcce 3c7fef33 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __se_sys_perf_event_open / find_get_context
2021/05/22 11:41 upstream 45af60e7ced0 3c7fef33 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __se_sys_perf_event_open / find_get_context
2021/05/20 03:55 upstream c3d0e3fd41b7 a343ba6b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __se_sys_perf_event_open / find_get_context
2021/05/15 01:33 upstream bd3c9cdb21a2 8bdd5343 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __se_sys_perf_event_open / find_get_context
2021/05/08 16:28 upstream dd860052c99b bc5434be .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __se_sys_perf_event_open / find_get_context
2021/04/29 15:42 upstream d72cd4ad4174 77e2b668 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __se_sys_perf_event_open / find_get_context
* Struck through repros no longer work on HEAD.