linux-yocto/net/9p
Ignacio Encinas 18296b5951 9p/trans_fd: mark concurrent read and writes to p9_conn->err
[ Upstream commit fbc0283fbe ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:59:20 +02:00
..
client.c 9p/net: fix improper handling of bogus negative read/write replies 2025-05-02 07:59:20 +02:00
error.c 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
Kconfig net/9p/usbg: Fix build error 2024-10-09 09:56:40 +02:00
Makefile net/9p/usbg: Add new usb gadget function transport 2024-09-03 09:57:08 +02:00
mod.c net/p9: load default transports 2022-01-10 10:00:09 +09:00
protocol.c net: 9p: avoid freeing uninit memory in p9pdu_vreadf 2023-12-13 05:44:30 +09:00
protocol.h net/9p: add p9_msg_buf_size() 2022-10-05 07:05:41 +09:00
trans_common.c 9p: fix file headers 2021-11-03 17:45:04 +09:00
trans_common.h 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
trans_fd.c 9p/trans_fd: mark concurrent read and writes to p9_conn->err 2025-05-02 07:59:20 +02:00
trans_rdma.c 9p/rdma: unmap receive dma buffer in rdma_request()/post_recv() 2023-02-24 13:42:28 +00:00
trans_usbg.c net/9p/usbg: fix handling of the failed kzalloc() memory allocation 2024-12-05 14:03:05 +01:00
trans_virtio.c net: 9p: virtio: drop owner assignment 2024-05-22 08:31:17 -04:00
trans_xen.c 9p/xen: fix release of IRQ 2024-12-05 14:03:06 +01:00