KCSAN: data-race in insert_work / wq_worker_running

4 views
Skip to first unread message

syzbot

unread,
Apr 28, 2022, 7:09:22 PM4/28/22
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 259b897e5a79 Merge tag 'platform-drivers-x86-v5.18-3' of g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=158fcbb2f00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a28b0f77655f4f1a
dashboard link: https://syzkaller.appspot.com/bug?extid=0041a787362c9e0005e9
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
CC: [da...@davemloft.net her...@gondor.apana.org.au ku...@kernel.org linux-...@vger.kernel.org net...@vger.kernel.org pab...@redhat.com steffen....@secunet.com]

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+0041a7...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in insert_work / wq_worker_running

read-write to 0xffff888237c2a7e0 of 4 bytes by task 1920 on cpu 0:
wq_worker_running+0x96/0xe0 kernel/workqueue.c:880
schedule_timeout+0xc1/0x290 kernel/time/timer.c:1884
synchronize_rcu_expedited_wait_once kernel/rcu/tree_exp.h:472 [inline]
synchronize_rcu_expedited_wait+0x1aa/0xac0 kernel/rcu/tree_exp.h:523
rcu_exp_wait_wake kernel/rcu/tree_exp.h:588 [inline]
rcu_exp_sel_wait_wake+0x355/0x660 kernel/rcu/tree_exp.h:622
wait_rcu_exp_gp+0x1a/0x20 kernel/rcu/tree_exp.h:633
process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
worker_thread+0x618/0xa70 kernel/workqueue.c:2436
kthread+0x1a9/0x1e0 kernel/kthread.c:376
ret_from_fork+0x1f/0x30

read to 0xffff888237c2a7e0 of 4 bytes by task 2315 on cpu 1:
__need_more_worker kernel/workqueue.c:785 [inline]
insert_work+0x10e/0x190 kernel/workqueue.c:1365
__queue_work+0x69e/0x8e0 kernel/workqueue.c:1517
queue_work_on+0x7e/0xe0 kernel/workqueue.c:1545
queue_work include/linux/workqueue.h:502 [inline]
schedule_work include/linux/workqueue.h:563 [inline]
__xfrm_state_destroy net/xfrm/xfrm_state.c:674 [inline]
xfrm_state_put include/net/xfrm.h:789 [inline]
xfrm_state_find+0x1521/0x1b80 net/xfrm/xfrm_state.c:1205
xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:2393 [inline]
xfrm_tmpl_resolve net/xfrm/xfrm_policy.c:2438 [inline]
xfrm_resolve_and_create_bundle+0x522/0x1bf0 net/xfrm/xfrm_policy.c:2728
xfrm_lookup_with_ifid+0x3be/0x1880 net/xfrm/xfrm_policy.c:3062
xfrm_lookup net/xfrm/xfrm_policy.c:3191 [inline]
xfrm_lookup_route+0x37/0x100 net/xfrm/xfrm_policy.c:3202
ip_route_output_flow+0x123/0x160 net/ipv4/route.c:2874
udp_sendmsg+0xd8b/0x1200 net/ipv4/udp.c:1220
inet_sendmsg+0x5f/0x80 net/ipv4/af_inet.c:819
sock_sendmsg_nosec net/socket.c:705 [inline]
sock_sendmsg net/socket.c:725 [inline]
____sys_sendmsg+0x38f/0x500 net/socket.c:2413
___sys_sendmsg net/socket.c:2467 [inline]
__sys_sendmmsg+0x27c/0x4a0 net/socket.c:2553
__do_sys_sendmmsg net/socket.c:2582 [inline]
__se_sys_sendmmsg net/socket.c:2579 [inline]
__x64_sys_sendmmsg+0x53/0x60 net/socket.c:2579
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+0x44/0xae

value changed: 0x00000000 -> 0x00000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 2315 Comm: syz-executor.1 Not tainted 5.18.0-rc4-syzkaller-00083-g259b897e5a79-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
syz-executor.1 (2315) used greatest stack depth: 10560 bytes left


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Sep 11, 2022, 6:09:23 PM9/11/22
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages