syzbot


KCSAN: data-race in io_req_defer_failed / io_wq_free_work (4)

Status: moderation: reported on 2024/11/24 22:24
Subsystems: io-uring
[Documentation on labels]
Reported-by: syzbot+163b6e5f366b31246c15@syzkaller.appspotmail.com
First crash: 151d, last: 28d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in io_req_defer_failed / io_wq_free_work (3) io-uring 2 188d 189d 0/28 auto-obsoleted due to no activity on 2024/11/22 15:00
upstream KCSAN: data-race in io_req_defer_failed / io_wq_free_work io-uring 3 327d 354d 0/28 auto-obsoleted due to no activity on 2024/07/07 04:35
upstream KCSAN: data-race in io_req_defer_failed / io_wq_free_work (2) io-uring 6 244d 256d 0/28 auto-obsoleted due to no activity on 2024/09/27 22:32

Sample crash report:
==================================================================
BUG: KCSAN: data-race in io_req_defer_failed / io_wq_free_work

write to 0xffff8881206fb648 of 8 bytes by task 3721 on cpu 1:
 req_set_fail io_uring/io_uring.h:-1 [inline]
 io_req_defer_failed+0x6f/0x430 io_uring/io_uring.c:929
 io_req_task_cancel+0x21/0x30 io_uring/io_uring.c:1362
 io_handle_tw_list+0x1bb/0x210 io_uring/io_uring.c:1059
 tctx_task_work_run+0x6e/0x1c0 io_uring/io_uring.c:1123
 tctx_task_work+0x44/0x80 io_uring/io_uring.c:1141
 task_work_run+0x13c/0x1b0 kernel/task_work.c:227
 get_signal+0xe81/0x1000 kernel/signal.c:2808
 arch_do_signal_or_restart+0x9a/0x4b0 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x62/0x120 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881206fb648 of 8 bytes by task 3728 on cpu 0:
 req_ref_put_and_test io_uring/refs.h:22 [inline]
 io_wq_free_work+0x24/0x1b0 io_uring/io_uring.c:1777
 io_worker_handle_work+0x4d1/0x9d0 io_uring/io-wq.c:604
 io_wq_worker+0x28c/0x820 io_uring/io-wq.c:655
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

value changed: 0x0000000000580071 -> 0x0000000000d80131

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3728 Comm: iou-wrk-3721 Not tainted 6.14.0-syzkaller-03576-g1e1ba8d23dae #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/27 10:01 upstream 1e1ba8d23dae 20510e88 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in io_req_defer_failed / io_wq_free_work
2025/03/19 12:32 upstream 81e4f8d68c66 8d0a2921 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in io_req_defer_failed / io_wq_free_work
2025/03/17 18:28 upstream 4701f33a1070 948c34e4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in io_req_defer_failed / io_wq_free_work
2025/03/10 11:27 upstream 80e54e84911a 163f510d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in io_req_defer_failed / io_wq_free_work
2025/01/22 02:33 upstream b9d8a295ed6b da72ac06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in io_req_defer_failed / io_wq_free_work
2025/01/19 02:18 upstream fda5e3f28400 f2cb035c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in io_req_defer_failed / io_wq_free_work
2024/12/16 15:48 upstream 78d4f34e2115 eec85da6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in io_req_defer_failed / io_wq_free_work
2024/11/24 22:23 upstream 9f16d5e6f220 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in io_req_defer_failed / io_wq_free_work
* Struck through repros no longer work on HEAD.