Commit 27a09a58 authored by Li Nan's avatar Li Nan
Browse files

md/dm-raid: don't clear MD_RECOVERY_FROZEN after setting frozen

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9Q98W


CVE: CVE-2024-35808

--------------------------------

MD_RECOVERY_FROZEN should always remain set after array is frozen. But
in raid_message(), this flag is cleared soon after frozen. Fix it. This
flag will be cleared in md_idle_sync_thread(), there is no need to clear
it again for idle.

Fixes: cd32b27a66db ("md/dm-raid: don't call md_reap_sync_thread() directly")
Signed-off-by: default avatarLi Nan <linan122@huawei.com>
parent fb8e9ee3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3687,8 +3687,9 @@ static int raid_message(struct dm_target *ti, unsigned int argc, char **argv,
		frozen_sync_thread(mddev);
	else if (!strcasecmp(argv[0], "idle"))
		idle_sync_thread(mddev);

	else
		clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);

	if (decipher_sync_action(mddev, mddev->recovery) != st_idle)
		return -EBUSY;
	else if (!strcasecmp(argv[0], "resync"))