lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <39f18982-813a-4bf5-8866-ddedf6fe664b@yukuai.org.cn>
Date: Sat, 20 Sep 2025 17:54:08 +0800
From: Yu Kuai <hailan@...uai.org.cn>
To: linan666@...weicloud.com, song@...nel.org, yukuai3@...wei.com
Cc: linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
 pmenzel@...gen.mpg.de, yangerkun@...wei.com, yi.zhang@...wei.com
Subject: Re: [PATCH v3] md: prevent incorrect update of resync/recovery offset

在 2025/9/4 15:34, linan666@...weicloud.com 写道:

> From: Li Nan <linan122@...wei.com>
>
> 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: 7d9f107a4e94 ("md: use new helpers in md_do_sync()")
> Signed-off-by: Li Nan <linan122@...wei.com>
> ---
> v3: add INTR flag, otherwise resync_min/max will be updated incorrectly.
> v2: fix typo.
>
>   drivers/md/md.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index e78f80d39271..f926695311a2 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -9397,6 +9397,11 @@ void md_do_sync(struct md_thread *thread)
>   	}
>   
>   	action = md_sync_action(mddev);
> +	if (action == ACTION_FROZEN || action == ACTION_IDLE) {
> +		set_bit(MD_RECOVERY_INTR, &mddev->recovery);
> +		goto skip;
> +	}
> +
>   	desc = md_sync_action_name(action);
>   	mddev->last_sync_action = action;
>   

Applied to md-6.18
Thanks


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ