syzbot


KCSAN: data-race in complete_signal / do_signal_stop (3)

Status: auto-closed as invalid on 2021/02/04 02:00
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+26681c7e84558c952b5f@syzkaller.appspotmail.com
First crash: 1279d, last: 1174d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in complete_signal / do_signal_stop (2) kernel 2 1357d 1362d 0/26 auto-closed as invalid on 2020/08/05 08:46
upstream KCSAN: data-race in complete_signal / do_signal_stop (4) kernel 10 1020d 1092d 0/26 auto-closed as invalid on 2021/07/07 21:44
upstream KCSAN: data-race in complete_signal / do_signal_stop kernel 4 1446d 1572d 0/26 auto-closed as invalid on 2020/06/11 12:17

Sample crash report:
==================================================================
BUG: KCSAN: data-race in complete_signal / do_signal_stop

read-write to 0xffff888131acb02c of 4 bytes by task 12279 on cpu 0:
 freezer_count include/linux/freezer.h:121 [inline]
 freezable_schedule include/linux/freezer.h:173 [inline]
 do_signal_stop+0x54f/0x6b0 kernel/signal.c:2396
 get_signal+0x73f/0x1440 kernel/signal.c:2628
 arch_do_signal_or_restart+0x2a/0x270 arch/x86/kernel/signal.c:811
 handle_signal_work kernel/entry/common.c:147 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
 exit_to_user_mode_prepare+0x109/0x1a0 kernel/entry/common.c:201
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:302
 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888131acb02c of 4 bytes by interrupt on cpu 1:
 wants_signal kernel/signal.c:978 [inline]
 complete_signal+0x7b/0x5f0 kernel/signal.c:1001
 send_sigqueue+0x248/0x400 kernel/signal.c:1881
 posix_timer_event kernel/time/posix-timers.c:354 [inline]
 posix_timer_fn+0xdd/0x1f0 kernel/time/posix-timers.c:380
 __run_hrtimer+0x133/0x420 kernel/time/hrtimer.c:1519
 __hrtimer_run_queues kernel/time/hrtimer.c:1583 [inline]
 hrtimer_interrupt+0x36e/0xa10 kernel/time/hrtimer.c:1645
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1085 [inline]
 __sysvec_apic_timer_interrupt+0x6f/0x200 arch/x86/kernel/apic/apic.c:1102
 asm_call_irq_on_stack+0xf/0x20
 __run_sysvec_on_irqstack arch/x86/include/asm/irq_stack.h:37 [inline]
 run_sysvec_on_irqstack_cond arch/x86/include/asm/irq_stack.h:89 [inline]
 sysvec_apic_timer_interrupt+0x52/0x90 arch/x86/kernel/apic/apic.c:1096
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628
 get_ctx kernel/kcsan/core.c:198 [inline]
 check_access kernel/kcsan/core.c:629 [inline]
 __tsan_unaligned_write8+0xff/0x190 kernel/kcsan/core.c:842
 rcu_cblist_dequeue+0x40/0x60 kernel/rcu/rcu_segcblist.c:75
 rcu_do_batch kernel/rcu/tree.c:2479 [inline]
 rcu_core+0x669/0xb90 kernel/rcu/tree.c:2723
 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2736
 __do_softirq+0x13c/0x2c3 kernel/softirq.c:343
 run_ksoftirqd+0x13/0x20 kernel/softirq.c:650
 smpboot_thread_fn+0x34f/0x520 kernel/smpboot.c:165
 kthread+0x1fd/0x220 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 5.11.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/31 01:59 upstream f6e1ea196492 5cc121d6 .config console log report info ci2-upstream-kcsan-gce
2020/12/23 03:39 upstream 614cb5894306 04201c06 .config console log report info ci2-upstream-kcsan-gce
2020/11/25 07:57 upstream 127c501a03d5 1a1f4bd8 .config console log report info ci2-upstream-kcsan-gce
2020/10/31 11:57 upstream 5fc6b075e165 8bc4594f .config console log report info ci2-upstream-kcsan-gce
2020/10/26 09:41 upstream 3650b228f83a a7aac492 .config console log report info ci2-upstream-kcsan-gce
2020/10/24 13:59 upstream f11901ed723d a1839e81 .config console log report info ci2-upstream-kcsan-gce
2020/10/15 21:03 upstream 726eb70e0d34 6e262c73 .config console log report info ci2-upstream-kcsan-gce
2020/09/16 18:58 upstream fc4f28bb3daf 77507d02 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.