Go to file
Li Nan 91b2601bd2 md: prevent incorrect update of resync/recovery offset
[ Upstream commit 7202082b7b ]

In md_do_sync(), when md_sync_action returns ACTION_FROZEN, subsequent
call to md_sync_position() will return MaxSector. This causes
'curr_resync' (and later 'recovery_offset') to be set to MaxSector too,
which incorrectly signals that recovery/resync has completed, even though
disk data has not actually been updated.

To fix this issue, skip updating any offset values when the sync action
is FROZEN. The same holds true for IDLE.

Fixes: 7d9f107a4e ("md: use new helpers in md_do_sync()")
Signed-off-by: Li Nan <linan122@huawei.com>
Link: https://lore.kernel.org/linux-raid/20250904073452.3408516-1-linan666@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-09-09 19:02:39 +02:00
arch
block
certs
crypto
Documentation
drivers md: prevent incorrect update of resync/recovery offset 2025-09-09 19:02:39 +02:00
fs cifs: prevent NULL pointer dereference in UTF16 conversion 2025-09-09 19:02:34 +02:00
include
init
io_uring
ipc
kernel audit: fix out-of-bounds read in audit_compare_dname_path() 2025-09-09 19:02:34 +02:00
lib
LICENSES
mm
net batman-adv: fix OOB read/write in network-coding decode 2025-09-09 19:02:34 +02:00
rust
samples
scripts rust: support Rust >= 1.91.0 target spec 2025-09-09 19:02:35 +02:00
security
sound ALSA: hda: tas2781: reorder tas2563 calibration variables 2025-09-09 19:02:36 +02:00
tools tools: gpio: remove the include directory on make clean 2025-09-09 19:02:39 +02:00
usr
virt
.clang-format
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.pylintrc
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
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.