Re: [PATCH] md/raid1: don't set array_frozen in raid1_takeover()

"yu kuai" <[email protected]>
Newsgroups gmane.linux.raid
Message-ID <[email protected]>
在 2026/8/4 2:02, Bruce Johnston 写道:

> raid1_takeover() sets conf->array_frozen = 1 on the newly-allocated
> r1conf and nothing ever clears it, so every I/O to the array stalls
> permanently once _wait_barrier() sees it stuck at 1.
>
> This used to be harmless: level_store() called mddev_resume() right
> after pers->run(), which called raid1_quiesce(mddev, 0) and cleared
> array_frozen back to 0 regardless of what raid1_takeover() set. Commit
> b39f35ebe86d ("md: don't quiesce in mddev_suspend()") removed that
> quiesce(mddev, 0) call, so the pre-set now sticks.
>
> setup_conf() already zero-initializes the new r1conf via kzalloc, so
> just don't set array_frozen here.
>
> Same class of bug as commit 892da88d1cd9 ("md/raid10: fix a
> 'conf->barrier' leakage in raid10_takeover()"), also triggered by
> b39f35ebe86d.
>
> Fixes: b39f35ebe86d ("md: don't quiesce in mddev_suspend()")
> Link:https://issues.redhat.com/browse/RHEL-191802
> Signed-off-by: Bruce Johnston<[email protected]>
> ---
>   drivers/md/raid1.c | 2 --
>   1 file changed, 2 deletions(-)
Applied to md-7.3

-- 
Thanks,
Kuai
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.