No description
  • C 96.8%
  • Assembly 0.9%
  • Rust 0.7%
  • Shell 0.6%
  • Python 0.5%
  • Other 0.3%
Find a file
Viacheslav Dubeyko 035df850cd ceph: fix potential race condition in ceph_ioctl_lazyio()
[ Upstream commit 5824ccba9a ]

The Coverity Scan service has detected potential
race condition in ceph_ioctl_lazyio() [1].

The CID 1591046 contains explanation: "Check of thread-shared
field evades lock acquisition (LOCK_EVASION). Thread1 sets
fmode to a new value. Now the two threads have an inconsistent
view of fmode and updates to fields correlated with fmode
may be lost. The data guarded by this critical section may
be read while in an inconsistent state or modified by multiple
racing threads. In ceph_ioctl_lazyio: Checking the value of
a thread-shared field outside of a locked region to determine
if a locked operation involving that thread shared field
has completed. (CWE-543)".

The patch places fi->fmode field access under ci->i_ceph_lock
protection. Also, it introduces the is_file_already_lazy
variable that is set under the lock and it is checked later
out of scope of critical section.

[1] https://scan5.scan.coverity.com/#/project-view/64304/10063?selectedIssue=1591046

Signed-off-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-11-13 15:37:39 -05:00
arch LoongArch: Handle new atomic instructions for probes 2025-11-13 15:37:38 -05:00
block blk-cgroup: fix possible deadlock while configuring policy 2025-11-13 15:36:52 -05:00
certs sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3 2024-09-20 19:52:48 +03:00
crypto crypto: essiv - Check ssize for decryption and in-place encryption 2025-10-19 16:37:14 +02:00
Documentation dt-bindings: display/msm/gmu: Update Adreno 623 bindings 2025-11-13 15:37:16 -05:00
drivers drm/amdgpu: Report individual reset error 2025-11-13 15:37:39 -05:00
fs ceph: fix potential race condition in ceph_ioctl_lazyio() 2025-11-13 15:37:39 -05:00
include scsi: ufs: core: Include UTP error in INT_FATAL_ERRORS 2025-11-13 15:37:37 -05:00
init init: handle bootloader identifier in kernel parameters 2025-10-19 16:37:27 +02:00
io_uring io_uring/zcrx: account niov arrays to cgroup 2025-11-13 15:36:51 -05:00
ipc vfs-6.17-rc1.mmap_prepare 2025-07-28 13:43:25 -07:00
kernel ftrace: Fix softlockup in ftrace_module_enable 2025-11-13 15:37:34 -05:00
lib kunit: Enable PCI on UML without triggering WARN() 2025-11-13 15:36:51 -05:00
LICENSES LICENSES: Replace the obsolete address of the FSF in the GFDL-1.2 2025-07-24 11:15:39 +02:00
mm treewide: remove MIGRATEPAGE_SUCCESS 2025-10-29 14:10:32 +01:00
net 9p/trans_fd: p9_fd_request: kick rx thread if EPOLLIN 2025-11-13 15:37:37 -05:00
rust rust: kunit: allow cfg on tests 2025-11-13 15:36:51 -05:00
samples 15 hotfixes. 11 are cc:stable and the remainder address post-6.16 issues 2025-09-17 21:34:26 -07:00
scripts docs: kernel-doc: avoid script crash on ancient Python 2025-11-13 15:36:58 -05:00
security ima: don't clear IMA_DIGSIG flag when setting or removing non-IMA xattr 2025-11-13 15:37:34 -05:00
sound ASoC: rt722: add settings for rt722VB 2025-11-13 15:37:39 -05:00
tools tools: lib: thermal: use pkg-config to locate libnl3 2025-11-13 15:37:38 -05:00
usr kbuild: uapi: Strip comments before size type check 2025-11-13 15:37:38 -05:00
virt Merge tag 'kvm-x86-no_assignment-6.17' of https://github.com/kvm-x86/linux into HEAD 2025-07-29 08:36:42 -04:00
.clang-format Linux 6.15-rc5 2025-05-06 16:39:25 +10:00
.clippy.toml rust: clean Rust 1.88.0's warning about clippy::disallowed_macros configuration 2025-05-07 00:11:47 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.editorconfig .editorconfig: remove trim_trailing_whitespace option 2024-06-13 16:47:52 +02:00
.get_maintainer.ignore MAINTAINERS: remove Alyssa Rosenzweig 2025-09-18 21:17:31 +02:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore gitignore: allow .pylintrc to be tracked 2025-07-02 17:10:04 -06:00
.mailmap 7 hotfixes. 4 are cc:stable and the remainder address post-6.16 issues or 2025-09-28 09:32:00 -07:00
.pylintrc docs: add a .pylintrc file with sys path for docs scripts 2025-04-09 12:10:33 -06:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: retire Boris from TLS maintainers 2025-08-26 17:36:01 -07:00
Kbuild drm: ensure drm headers are self-contained and pass kernel-doc 2025-02-12 10:44:43 +02:00
Kconfig io_uring: Rename KConfig to Kconfig 2025-02-19 14:53:27 -07:00
MAINTAINERS i2c-for-6.17-rc8 2025-09-28 13:19:23 -07:00
Makefile Linux 6.17.7 2025-11-02 22:18:05 +09:00
README README: Fix spelling 2024-03-18 03:36:32 -06:00

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.