syzbot


KCSAN: data-race in rcu_gp_fqs_check_wake / rcu_note_context_switch

Status: fixed on 2020/02/18 14:31
Subsystems: cgroups
[Documentation on labels]
Fix commit: 6935c3983b24 rcu: Avoid data-race in rcu_gp_fqs_check_wake()
First crash: 1829d, last: 1710d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in rcu_gp_fqs_check_wake / rcu_note_context_switch

write to 0xffffffff85c7d0d0 of 8 bytes by task 17503 on cpu 0:
 rcu_preempt_ctxt_queue kernel/rcu/tree_plugin.h:223 [inline]
 rcu_note_context_switch+0x6f6/0x760 kernel/rcu/tree_plugin.h:315
 __schedule+0xa4/0x690 kernel/sched/core.c:4019
 preempt_schedule_irq+0x57/0x90 kernel/sched/core.c:4338
 restore_regs_and_return_to_kernel+0x0/0x25
 check_kcov_mode kernel/kcov.c:153 [inline]
 write_comp_data+0x17/0x70 kernel/kcov.c:208
 __read_once_size+0x25/0xe0 include/linux/compiler.h:232
 __ref_is_percpu include/linux/percpu-refcount.h:161 [inline]
 percpu_ref_get_many include/linux/percpu-refcount.h:191 [inline]
 percpu_ref_get include/linux/percpu-refcount.h:209 [inline]
 cgroup_bpf_get include/linux/cgroup.h:939 [inline]
 cgroup_sk_alloc+0x126/0x460 kernel/cgroup/cgroup.c:6270
 sk_alloc+0x263/0x5b0 net/core/sock.c:1677
 __netlink_create+0x59/0x140 net/netlink/af_netlink.c:629
 netlink_create+0x29c/0x400 net/netlink/af_netlink.c:692
 __sock_create+0x241/0x3a0 net/socket.c:1420
 sock_create net/socket.c:1471 [inline]
 __sys_socket+0x96/0x170 net/socket.c:1513
 __do_sys_socket net/socket.c:1522 [inline]
 __se_sys_socket net/socket.c:1520 [inline]
 __x64_sys_socket+0x4c/0x60 net/socket.c:1520
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffffffff85c7d0d0 of 8 bytes by task 10 on cpu 1:
 rcu_gp_fqs_check_wake kernel/rcu/tree.c:1606 [inline]
 rcu_gp_fqs_check_wake+0x93/0xd0 kernel/rcu/tree.c:1596
 rcu_gp_fqs_loop+0x1df/0x580 kernel/rcu/tree.c:1661
 rcu_gp_kthread+0x143/0x230 kernel/rcu/tree.c:1821
 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

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

Crashes (51):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/06 12:00 https://github.com/google/ktsan.git kcsan 245a43005292 5be3a391 .config console log report ci2-upstream-kcsan-gce
2020/02/05 13:48 https://github.com/google/ktsan.git kcsan 245a43005292 662cf49a .config console log report ci2-upstream-kcsan-gce
2020/02/01 23:00 https://github.com/google/ktsan.git kcsan 245a43005292 2274ad39 .config console log report ci2-upstream-kcsan-gce
2020/01/27 15:15 https://github.com/google/ktsan.git kcsan 245a43005292 56cd6c9b .config console log report ci2-upstream-kcsan-gce
2020/01/26 16:02 https://github.com/google/ktsan.git kcsan 245a43005292 dd56146d .config console log report ci2-upstream-kcsan-gce
2020/01/25 22:19 https://github.com/google/ktsan.git kcsan 245a43005292 f4e7270e .config console log report ci2-upstream-kcsan-gce
2020/01/22 18:38 https://github.com/google/ktsan.git kcsan 245a43005292 3334d684 .config console log report ci2-upstream-kcsan-gce
2020/01/15 17:32 https://github.com/google/ktsan.git kcsan 245a43005292 f9b69507 .config console log report ci2-upstream-kcsan-gce
2020/01/15 15:31 https://github.com/google/ktsan.git kcsan 245a43005292 069a5a44 .config console log report ci2-upstream-kcsan-gce
2020/01/14 19:18 https://github.com/google/ktsan.git kcsan 245a43005292 fa12bd3c .config console log report ci2-upstream-kcsan-gce
2020/01/13 23:43 https://github.com/google/ktsan.git kcsan 245a43005292 32881205 .config console log report ci2-upstream-kcsan-gce
2020/01/12 10:47 https://github.com/google/ktsan.git kcsan 245a43005292 31290a45 .config console log report ci2-upstream-kcsan-gce
2020/01/11 03:05 https://github.com/google/ktsan.git kcsan 245a43005292 4c04afaa .config console log report ci2-upstream-kcsan-gce
2020/01/10 14:23 https://github.com/google/ktsan.git kcsan 245a43005292 2e0a9b2b .config console log report ci2-upstream-kcsan-gce
2020/01/03 11:12 https://github.com/google/ktsan.git kcsan 245a43005292 9dcc1191 .config console log report ci2-upstream-kcsan-gce
2019/12/28 10:55 https://github.com/google/ktsan.git kcsan 245a43005292 af6b8ef8 .config console log report ci2-upstream-kcsan-gce
2019/12/28 10:54 https://github.com/google/ktsan.git kcsan 245a43005292 af6b8ef8 .config console log report ci2-upstream-kcsan-gce
2019/12/23 10:17 https://github.com/google/ktsan.git kcsan 245a43005292 be5c2c81 .config console log report ci2-upstream-kcsan-gce
2019/12/22 11:31 https://github.com/google/ktsan.git kcsan 245a43005292 8b967267 .config console log report ci2-upstream-kcsan-gce
2019/12/20 13:32 https://github.com/google/ktsan.git kcsan 245a43005292 34011c05 .config console log report ci2-upstream-kcsan-gce
2019/12/17 15:17 https://github.com/google/ktsan.git kcsan 245a43005292 1af3875f .config console log report ci2-upstream-kcsan-gce
2019/12/17 01:26 https://github.com/google/ktsan.git kcsan 245a43005292 d13d7958 .config console log report ci2-upstream-kcsan-gce
2019/12/13 19:28 https://github.com/google/ktsan.git kcsan 245a43005292 a5c1ab05 .config console log report ci2-upstream-kcsan-gce
2019/12/13 19:25 https://github.com/google/ktsan.git kcsan 245a43005292 a5c1ab05 .config console log report ci2-upstream-kcsan-gce
2019/12/13 05:42 https://github.com/google/ktsan.git kcsan 245a43005292 2a752b7c .config console log report ci2-upstream-kcsan-gce
2019/12/12 05:43 https://github.com/google/ktsan.git kcsan ef798c30ba4e d973f528 .config console log report ci2-upstream-kcsan-gce
2019/12/11 14:27 https://github.com/google/ktsan.git kcsan ef798c30ba4e 0d368675 .config console log report ci2-upstream-kcsan-gce
2019/12/10 20:59 https://github.com/google/ktsan.git kcsan ef798c30ba4e 101194eb .config console log report ci2-upstream-kcsan-gce
2019/12/09 14:03 https://github.com/google/ktsan.git kcsan ef798c30ba4e b31eda3d .config console log report ci2-upstream-kcsan-gce
2019/12/06 16:22 https://github.com/google/ktsan.git kcsan ef798c30ba4e 85f26751 .config console log report ci2-upstream-kcsan-gce
2019/12/06 10:49 https://github.com/google/ktsan.git kcsan ef798c30ba4e 12c3b6cd .config console log report ci2-upstream-kcsan-gce
2019/12/06 01:07 https://github.com/google/ktsan.git kcsan ef798c30ba4e 98b4ef2d .config console log report ci2-upstream-kcsan-gce
2019/12/03 19:42 https://github.com/google/ktsan.git kcsan ef798c30ba4e 0ecb9746 .config console log report ci2-upstream-kcsan-gce
2019/12/01 20:31 https://github.com/google/ktsan.git kcsan ef798c30ba4e f879db37 .config console log report ci2-upstream-kcsan-gce
2019/11/28 23:14 https://github.com/google/ktsan.git kcsan ef798c30ba4e 76357d6f .config console log report ci2-upstream-kcsan-gce
2019/11/26 19:56 https://github.com/google/ktsan.git kcsan ef798c30ba4e 1048481f .config console log report ci2-upstream-kcsan-gce
2019/11/26 19:56 https://github.com/google/ktsan.git kcsan ef798c30ba4e 1048481f .config console log report ci2-upstream-kcsan-gce
2019/11/22 11:32 https://github.com/google/ktsan.git kcsan 5863cc791e4c 598ca6c8 .config console log report ci2-upstream-kcsan-gce
2019/11/17 08:44 https://github.com/google/ktsan.git kcsan 5863cc791e4c d5696d51 .config console log report ci2-upstream-kcsan-gce
2019/11/16 05:32 https://github.com/google/ktsan.git kcsan 5863cc791e4c cdac920b .config console log report ci2-upstream-kcsan-gce
2019/11/08 07:33 https://github.com/google/ktsan.git kcsan 94c006602e13 1e35461e .config console log report ci2-upstream-kcsan-gce
2019/11/07 15:53 https://github.com/google/ktsan.git kcsan 94c006602e13 f39aff9e .config console log report ci2-upstream-kcsan-gce
2019/11/05 12:37 https://github.com/google/ktsan.git kcsan 94c006602e13 0f3ec414 .config console log report ci2-upstream-kcsan-gce
2019/11/03 21:53 https://github.com/google/ktsan.git kcsan 05f2236801fe b35fad31 .config console log report ci2-upstream-kcsan-gce
2019/10/30 21:09 https://github.com/google/ktsan.git kcsan 05f2236801fe a41ca8fa .config console log report ci2-upstream-kcsan-gce
2019/10/29 04:24 https://github.com/google/ktsan.git kcsan 05f2236801fe 5ea87a66 .config console log report ci2-upstream-kcsan-gce
2019/10/28 16:44 https://github.com/google/ktsan.git kcsan 05f2236801fe 439d7b14 .config console log report ci2-upstream-kcsan-gce
2019/10/22 17:30 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/11 16:33 https://github.com/google/ktsan.git kcsan d724f94f63de 426631dd .config console log report ci2-upstream-kcsan-gce
2019/10/10 20:54 https://github.com/google/ktsan.git kcsan d724f94f63de 1a3bad90 .config console log report ci2-upstream-kcsan-gce
2019/10/09 23:33 https://github.com/google/ktsan.git kcsan d724f94f63de c4b9981b .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.