Files
twx-linux/drivers/md
Yu Kuai 20c2d2c323 md: don't rely on 'mddev->pers' to be set in mddev_suspend()
[ Upstream commit b721e7885e ]

'active_io' used to be initialized while the array is running, and
'mddev->pers' is set while the array is running as well. Hence caller
must hold 'reconfig_mutex' and guarantee 'mddev->pers' is set before
calling mddev_suspend().

Now that 'active_io' is initialized when mddev is allocated, such
restriction doesn't exist anymore. In the meantime, follow up patches
will refactor mddev_suspend(), hence add checking for 'mddev->pers' to
prevent null-ptr-deref.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230825030956.1527023-4-yukuai1@huaweicloud.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 17:19:39 +00:00
..
2023-08-02 09:13:09 -06:00
2023-07-27 00:13:30 -07:00
2023-07-27 00:13:30 -07:00