mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
md: release allocated bitset sync_set
Patch fixes kmemleak on md_stop() path used likely only by dm-raid wrapper. Code of md is using mddev_put() where both bitsets are released however this freeing is not shared. Also set NULL to bio_set and sync_set pointers just like mddev_put is doing. Signed-off-by: Zdenek Kabelac <[email protected]> Signed-off-by: Shaohua Li <[email protected]>
This commit is contained in:
parent
97f0eb9f0f
commit
0202ce8a90
1 changed files with 7 additions and 1 deletions
|
|
@ -5852,8 +5852,14 @@ void md_stop(struct mddev *mddev)
|
|||
* This is called from dm-raid
|
||||
*/
|
||||
__md_stop(mddev);
|
||||
if (mddev->bio_set)
|
||||
if (mddev->bio_set) {
|
||||
bioset_free(mddev->bio_set);
|
||||
mddev->bio_set = NULL;
|
||||
}
|
||||
if (mddev->sync_set) {
|
||||
bioset_free(mddev->sync_set);
|
||||
mddev->sync_set = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(md_stop);
|
||||
|
|
|
|||
Loading…
Reference in a new issue