Go to file
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
arch um: work around sched_yield not yielding in time-travel mode 2025-05-02 07:59:19 +02:00
block block: never reduce ra_pages in blk_apply_bdi_limits 2025-05-02 07:59:03 +02:00
certs
crypto crypto: null - Use spin lock instead of mutex 2025-05-02 07:59:15 +02:00
Documentation bpf: Add namespace to BPF internal symbols 2025-05-02 07:59:04 +02:00
drivers ntb_hw_amd: Add NTB PCI ID for new gen CPU 2025-05-02 07:59:20 +02:00
fs fs/ntfs3: Fix WARNING in ntfs_extend_initialized_size 2025-05-02 07:59:17 +02:00
include netfilter: fib: avoid lookup if socket is available 2025-05-02 07:59:05 +02:00
init
io_uring io_uring: fix 'sync' handling of io_fallback_tw() 2025-05-02 07:59:08 +02:00
ipc
kernel objtool, panic: Disable SMAP in __stack_chk_fail() 2025-05-02 07:59:19 +02:00
lib crypto: lib/Kconfig - Fix lib built-in failure when arch is modular 2025-05-02 07:59:15 +02:00
LICENSES
mm mm/vmscan: don't try to reclaim hwpoison folio 2025-05-02 07:58:52 +02:00
net 9p/trans_fd: mark concurrent read and writes to p9_conn->err 2025-05-02 07:59:20 +02:00
rust rust: firmware: Use ffi::c_char type in FwFunc 2025-05-02 07:59:06 +02:00
samples tracing: Verify event formats that have "%*p.." 2025-05-02 07:58:52 +02:00
scripts scripts: generate_rust_analyzer: Add ffi crate 2025-04-25 10:48:04 +02:00
security
sound objtool, ASoC: codecs: wcd934x: Remove potential undefined behavior in wcd934x_slim_irq_handler() 2025-05-02 07:59:19 +02:00
tools objtool, panic: Disable SMAP in __stack_chk_fail() 2025-05-02 07:59:19 +02:00
usr
virt
.clang-format
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 6.12.25 2025-04-25 10:48:08 +02:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.