Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e817bf3f authored by Martin K. Petersen's avatar Martin K. Petersen Committed by Jens Axboe
Browse files

block: Fix double free in blk_integrity_unregister



Commit 3839e4b2 introduced a kobject_put but failed to remove the
kmem_cache_free beneath it, leading to a double free.

Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 892b6f90
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -432,7 +432,6 @@ void blk_integrity_unregister(struct gendisk *disk)
	kobject_uevent(&bi->kobj, KOBJ_REMOVE);
	kobject_del(&bi->kobj);
	kobject_put(&bi->kobj);
	kmem_cache_free(integrity_cachep, bi);
	disk->integrity = NULL;
}
EXPORT_SYMBOL(blk_integrity_unregister);