md/raid10: fix memleak of md thread
stable inclusion from stable-v5.10.180 commit 2a65555f7e0f4a05b663879908a991e6d9f81e51 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8DDFN Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2a65555f7e0f4a05b663879908a991e6d9f81e51 -------------------------------- [ Upstream commit f0ddb83d ] In raid10_run(), if setup_conf() succeed and raid10_run() failed before setting 'mddev->thread', then in the error path 'conf->thread' is not freed. Fix the problem by setting 'mddev->thread' right after setup_conf(). Fixes: 43a52123 ("md-cluster: choose correct label when clustered layout is not supported") Signed-off-by:Yu Kuai <yukuai3@huawei.com> Signed-off-by:
Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20230310073855.1337560-7-yukuai1@huaweicloud.com Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment