Re: [PATCH -next v3] md: Hold mddev->reconfig_mutex when trying to get mddev->sync_thread
From: Song Liu
Date: Sun Aug 13 2023 - 13:05:35 EST
On Thu, Aug 3, 2023 at 11:20 AM Li Lingfeng <lilingfeng@xxxxxxxxxxxxxxx> wrote:
>
> From: Li Lingfeng <lilingfeng3@xxxxxxxxxx>
>
> Commit ba9d9f1a707f ("Revert "md: unlock mddev before reap sync_thread in
> action_store"") removed the scenario of calling md_unregister_thread()
> without holding mddev->reconfig_mutex, so add a lock holding check before
> acquiring mddev->sync_thread by passing mdev to md_unregister_thread().
>
> Signed-off-by: Li Lingfeng <lilingfeng3@xxxxxxxxxx>
> Reviewed-by: Yu Kuai <yukuai3@xxxxxxxxxx>
Applied to md-next.
Thanks,
Song