[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPhsuW7y32Mw+PmvnLg-o=ZS22ZOuzLd19zDHix3qA93_X8SGA@mail.gmail.com>
Date: Mon, 29 Jan 2024 23:11:18 -0800
From: Song Liu <song@...nel.org>
To: Li Lingfeng <lilingfeng@...weicloud.com>
Cc: linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
yukuai3@...wei.com, yukuai1@...weicloud.com, linan122@...wei.com,
yi.zhang@...wei.com, yangerkun@...wei.com, lilingfeng3@...wei.com
Subject: Re: [PATCH] md: use RCU lock to protect traversal in md_spares_need_change()
On Thu, Jan 4, 2024 at 5:39 AM Li Lingfeng <lilingfeng@...weicloud.com> wrote:
>
> From: Li Lingfeng <lilingfeng3@...wei.com>
>
> Since md_start_sync() will be called without the protect of mddev_lock,
> and it can run concurrently with array reconfiguration, traversal of rdev
> in it should be protected by RCU lock.
> Commit bc08041b32ab ("md: suspend array in md_start_sync() if array need
> reconfiguration") added md_spares_need_change() to md_start_sync(),
> casusing use of rdev without any protection.
> Fix this by adding RCU lock in md_spares_need_change().
>
> Fixes: bc08041b32ab ("md: suspend array in md_start_sync() if array need reconfiguration")
> Signed-off-by: Li Lingfeng <lilingfeng3@...wei.com>
Looks good to me. Applied to md-tmp-6.9.
Thanks,
Song
Powered by blists - more mailing lists