blatt A1
Go to file
linke li aba6f11e23 sbitmap: use READ_ONCE to access map->word
[ Upstream commit 6ad0d7e0f4b68f87a98ea2b239123b7d865df86b ]

In __sbitmap_queue_get_batch(), map->word is read several times, and
update atomically using atomic_long_try_cmpxchg(). But the first two read
of map->word is not protected.

This patch moves the statement val = READ_ONCE(map->word) forward,
eliminating unprotected accesses to map->word within the function.
It is aimed at reducing the number of benign races reported by KCSAN in
order to focus future debugging effort on harmful races.

Signed-off-by: linke li <lilinke99@qq.com>
Link: https://lore.kernel.org/r/tencent_0B517C25E519D3D002194E8445E86C04AD0A@qq.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: 72d04bdcf3f7 ("sbitmap: fix io hung due to race on sbitmap_word::cleared")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 08:49:29 +02:00
arch powerpc/xmon: Fix disassembly CPU feature checks 2024-08-03 08:49:22 +02:00
block block: initialize integrity buffer to zero before writing it to media 2024-08-03 08:48:53 +02:00
certs
crypto crypto: aead,cipher - zeroize key buffer after use 2024-07-11 12:47:05 +02:00
Documentation cifs: fix setting SecurityFlags to true 2024-07-18 13:18:37 +02:00
drivers s390/dasd: fix error checks in dasd_copy_pair_store() 2024-08-03 08:49:29 +02:00
fs fs/ntfs3: Keep runs for $MFT::$ATTR_DATA and $MFT::$ATTR_BITMAP 2024-08-03 08:49:28 +02:00
include ipv4: Fix incorrect TOS in route get reply 2024-08-03 08:49:24 +02:00
init smp: Provide 'setup_max_cpus' definition on UP too 2024-06-16 13:41:42 +02:00
io_uring io_uring/sqpoll: work around a potential audit memory leak 2024-06-27 13:46:14 +02:00
ipc
kernel bpf: Eliminate remaining "make W=1" warnings in kernel/bpf/btf.o 2024-08-03 08:49:09 +02:00
lib sbitmap: use READ_ONCE to access map->word 2024-08-03 08:49:29 +02:00
LICENSES
mm mm/damon/core: merge regions aggressively when max_nr_regions is unmet 2024-07-25 09:49:07 +02:00
net ipv4: Fix incorrect TOS in fibmatch route get reply 2024-08-03 08:49:24 +02:00
rust rust: macros: fix soundness issue in module! macro 2024-05-17 11:56:17 +02:00
samples work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:12:28 +01:00
scripts kconfig: remove wrong expr_trans_bool() 2024-07-25 09:49:11 +02:00
security ima: Avoid blocking in RCU read-side critical section 2024-07-11 12:47:16 +02:00
sound ASoC: amd: Adjust error handling in case of absent codec device 2024-08-03 08:49:21 +02:00
tools ipv4: Fix incorrect TOS in fibmatch route get reply 2024-08-03 08:49:24 +02:00
usr
virt KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() 2024-06-27 13:46:21 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: add leah to 6.1 MAINTAINERS file 2024-05-17 11:56:16 +02:00
Makefile Linux 6.1.102 2024-07-27 11:32:20 +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 Restructured Text 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.