syzbot


KCSAN: data-race in p9_conn_cancel / p9_poll_workfn (9)

Status: upstream: reported on 2025/02/07 13:31
Subsystems: v9fs
[Documentation on labels]
Reported-by: syzbot+483d6c9b9231ea7e1851@syzkaller.appspotmail.com
Fix commit: 9p/trans_fd: mark concurrent read and writes to p9_conn->err
Patched on: [ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 49d, last: 10d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH v3] 9p/trans_fd: mark concurrent read and writes to p9_conn->err 2 (2) 2025/03/18 22:01
[PATCH v2] 9p/trans_fd: mark concurrent read and writes to p9_conn->err 3 (3) 2025/03/17 17:01
[PATCH] 9p/trans_fd: mark concurrent read and writes to p9_conn->err 3 (3) 2025/03/09 07:35
[syzbot] [v9fs?] KCSAN: data-race in p9_conn_cancel / p9_poll_workfn (9) 0 (1) 2025/02/07 13:31
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in p9_conn_cancel / p9_poll_workfn (4) v9fs 1 364d 364d 0/28 auto-obsoleted due to no activity on 2024/05/02 19:52
upstream KCSAN: data-race in p9_conn_cancel / p9_poll_workfn (7) v9fs 2 194d 209d 0/28 auto-obsoleted due to no activity on 2024/10/19 18:15
upstream KCSAN: data-race in p9_conn_cancel / p9_poll_workfn (2) v9fs 1 613d 613d 0/28 auto-obsoleted due to no activity on 2023/08/28 09:43
upstream KCSAN: data-race in p9_conn_cancel / p9_poll_workfn (5) v9fs 1 328d 328d 0/28 auto-obsoleted due to no activity on 2024/06/08 01:35
upstream KCSAN: data-race in p9_conn_cancel / p9_poll_workfn (6) v9fs 1 284d 284d 0/28 auto-obsoleted due to no activity on 2024/07/22 12:28
upstream KCSAN: data-race in p9_conn_cancel / p9_poll_workfn (3) v9fs 1 554d 554d 0/28 auto-obsoleted due to no activity on 2023/10/26 00:39
upstream KCSAN: data-race in p9_conn_cancel / p9_poll_workfn (8) v9fs 1 123d 123d 0/28 auto-obsoleted due to no activity on 2025/01/20 09:01
upstream KCSAN: data-race in p9_conn_cancel / p9_poll_workfn v9fs 1 1308d 1308d 0/28 auto-closed as invalid on 2021/10/01 19:17

Sample crash report:
==================================================================
BUG: KCSAN: data-race in p9_conn_cancel / p9_poll_workfn

write to 0xffff88811880be28 of 4 bytes by task 13649 on cpu 1:
 p9_conn_cancel+0x89/0x400 net/9p/trans_fd.c:199
 p9_write_work+0x3ac/0x750 net/9p/trans_fd.c:522
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0x4db/0xa20 kernel/workqueue.c:3319
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3400
 kthread+0x4ae/0x520 kernel/kthread.c:464
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff88811880be28 of 4 bytes by task 3368 on cpu 0:
 p9_poll_mux net/9p/trans_fd.c:625 [inline]
 p9_poll_workfn+0xc0/0x410 net/9p/trans_fd.c:1177
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0x4db/0xa20 kernel/workqueue.c:3319
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3400
 kthread+0x4ae/0x520 kernel/kthread.c:464
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

value changed: 0x00000000 -> 0xffffffe0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3368 Comm: kworker/0:2 Tainted: G        W          6.14.0-rc7-syzkaller #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: events p9_poll_workfn
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/17 20:43 upstream 4701f33a1070 ce3352cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in p9_conn_cancel / p9_poll_workfn
2025/02/07 02:22 upstream bb066fe812d6 8002dd28 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in p9_conn_cancel / p9_poll_workfn
* Struck through repros no longer work on HEAD.