Merge tag 'md-fixes-2023-03-29' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-6.3
Pull MD fix from Song. * tag 'md-fixes-2023-03-29' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: fix regression for null-ptr-deference in __md_stop()
This commit is contained in:
commit
24ab70d837
|
@ -6260,7 +6260,6 @@ static void __md_stop(struct mddev *mddev)
|
|||
module_put(pers->owner);
|
||||
clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
|
||||
|
||||
percpu_ref_exit(&mddev->writes_pending);
|
||||
percpu_ref_exit(&mddev->active_io);
|
||||
bioset_exit(&mddev->bio_set);
|
||||
bioset_exit(&mddev->sync_set);
|
||||
|
@ -6273,6 +6272,7 @@ void md_stop(struct mddev *mddev)
|
|||
*/
|
||||
__md_stop_writes(mddev);
|
||||
__md_stop(mddev);
|
||||
percpu_ref_exit(&mddev->writes_pending);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(md_stop);
|
||||
|
@ -7843,6 +7843,7 @@ static void md_free_disk(struct gendisk *disk)
|
|||
{
|
||||
struct mddev *mddev = disk->private_data;
|
||||
|
||||
percpu_ref_exit(&mddev->writes_pending);
|
||||
mddev_free(mddev);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue