summaryrefslogtreecommitdiffstats
path: root/rust/helpers/build_bug.c
diff options
context:
space:
mode:
authorIgnacio Encinas <ignacio@iencinas.com>2025-03-18 22:39:02 +0100
committerDominique Martinet <asmadeus@codewreck.org>2025-03-19 21:20:31 +0900
commitfbc0283fbeae27b88448c90305e738991457fee2 (patch)
tree2f739e0697b1e49ee7a21b50ec44485baee7a244 /rust/helpers/build_bug.c
parentad6d4558a7112af9e5f6727ac24fd8cd17469739 (diff)
downloadlinux-fbc0283fbeae27b88448c90305e738991457fee2.tar.gz
linux-fbc0283fbeae27b88448c90305e738991457fee2.tar.bz2
linux-fbc0283fbeae27b88448c90305e738991457fee2.zip
9p/trans_fd: mark concurrent read and writes to p9_conn->err
Writes for the error value of a connection are spinlock-protected inside p9_conn_cancel, but lockless reads are present elsewhere to avoid performing unnecessary work after an error has been met. Mark the write and lockless reads to make KCSAN happy. Mark the write as exclusive following the recommendation in "Lock-Protected Writes with Lockless Reads" in tools/memory-model/Documentation/access-marking.txt while we are at it. Mark p9_fd_request and p9_conn_cancel m->err reads despite the fact that they do not race with concurrent writes for stylistic reasons. Reported-by: syzbot+d69a7cc8c683c2cb7506@syzkaller.appspotmail.com Reported-by: syzbot+483d6c9b9231ea7e1851@syzkaller.appspotmail.com Signed-off-by: Ignacio Encinas <ignacio@iencinas.com> Message-ID: <20250318-p9_conn_err_benign_data_race-v3-1-290bb18335cc@iencinas.com> Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'rust/helpers/build_bug.c')
0 files changed, 0 insertions, 0 deletions