diff options
author | Yu Kuai <yukuai3@huawei.com> | 2023-08-25 11:09:52 +0800 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2023-09-22 10:28:26 -0700 |
commit | b721e7885eb242aa2459ee66bb42ceef1bcf0f0c (patch) | |
tree | de2391398ad9305353f5fcbd6970877a9923e9b8 /tools/perf/scripts/python/gecko.py | |
parent | b8494823e236326500aa1004155e83f748dd10da (diff) |
md: don't rely on 'mddev->pers' to be set in mddev_suspend()
'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
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions