syzbot


KCSAN: data-race in __perf_event_overflow / perf_event_exit_event (3)

Status: auto-closed as invalid on 2022/08/10 13:06
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 145d, last: 145d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __perf_event_overflow / perf_event_exit_event (2) 1 211d 211d 0/24 auto-closed as invalid on 2022/06/05 23:28
upstream KCSAN: data-race in __perf_event_overflow / perf_event_exit_event 1 299d 299d 0/24 auto-closed as invalid on 2022/03/09 13:53

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __perf_event_overflow / perf_event_exit_event

read to 0xffff88813a77870c of 4 bytes by task 7323 on cpu 0:
 perf_event_wakeup kernel/events/core.c:6408 [inline]
 perf_event_exit_event+0x5da/0x780 kernel/events/core.c:12690
 perf_event_exit_task_context kernel/events/core.c:12756 [inline]
 perf_event_exit_task+0x479/0x600 kernel/events/core.c:12789
 do_exit+0x599/0x1720 kernel/exit.c:804
 do_group_exit+0xa5/0x160 kernel/exit.c:925
 get_signal+0xf54/0x1020 kernel/signal.c:2857
 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
 ret_from_fork+0x15/0x30

write to 0xffff88813a77870c of 4 bytes by interrupt on cpu 1:
 __perf_event_overflow+0x76/0x1e0 kernel/events/core.c:9187
 perf_swevent_hrtimer+0x255/0x310 kernel/events/core.c:10590
 __run_hrtimer+0x132/0x420 kernel/time/hrtimer.c:1685
 __hrtimer_run_queues kernel/time/hrtimer.c:1749 [inline]
 hrtimer_interrupt+0x36e/0xa70 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline]
 __sysvec_apic_timer_interrupt+0xa3/0x250 arch/x86/kernel/apic/apic.c:1112
 sysvec_apic_timer_interrupt+0x88/0xb0 arch/x86/kernel/apic/apic.c:1106
 asm_sysvec_apic_timer_interrupt+0x1b/0x20
 folio_memcg_lock+0x0/0xf0 mm/memcontrol.c:2020
 __folio_cancel_dirty+0x6f/0x160 mm/page-writeback.c:2773
 folio_cancel_dirty include/linux/pagemap.h:1068 [inline]
 try_to_free_buffers+0xef/0x170 fs/buffer.c:3243
 jbd2_journal_try_to_free_buffers+0x1cb/0x1f0 fs/jbd2/transaction.c:2178
 ext4_release_folio+0x95/0x160 fs/ext4/inode.c:3267
 filemap_release_folio+0x8c/0xc0 mm/filemap.c:3974
 block_invalidate_folio+0x45b/0x480 fs/buffer.c:1541
 ext4_invalidate_folio+0x6b/0x130 fs/ext4/inode.c:3230
 folio_invalidate mm/truncate.c:159 [inline]
 truncate_cleanup_folio mm/truncate.c:179 [inline]
 truncate_inode_pages_range+0x32a/0xae0 mm/truncate.c:369
 truncate_inode_pages mm/truncate.c:452 [inline]
 truncate_pagecache+0x4f/0x70 mm/truncate.c:753
 ext4_setattr+0x9a0/0xde0 fs/ext4/inode.c:5502
 notify_change+0x8e6/0xa00 fs/attr.c:424
 do_truncate+0xf7/0x140 fs/open.c:65
 handle_truncate fs/namei.c:3176 [inline]
 do_open fs/namei.c:3524 [inline]
 path_openat+0x1834/0x1b30 fs/namei.c:3653
 do_filp_open+0x105/0x220 fs/namei.c:3680
 do_sys_openat2+0xb5/0x2a0 fs/open.c:1278
 do_sys_open fs/open.c:1294 [inline]
 __do_sys_creat fs/open.c:1370 [inline]
 __se_sys_creat fs/open.c:1364 [inline]
 __x64_sys_creat+0x62/0x80 fs/open.c:1364
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 7275 Comm: syz-executor.0 Not tainted 5.19.0-rc5-syzkaller-00056-ge35e5b6f695d-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/06 13:03 upstream e35e5b6f695d bff65f44 .config log report info KCSAN: data-race in __perf_event_overflow / perf_event_exit_event
* Struck through repros no longer work on HEAD.