From: Martin K. Petersen Date: Fri, 15 Oct 2010 13:49:18 +0000 (+0200) Subject: block: Fix double free in blk_integrity_unregister X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e817bf3f68f55e7307c3e9abe5f32d0c05c83988;p=openwrt%2Fstaging%2Fblogic.git block: Fix double free in blk_integrity_unregister Commit 3839e4b introduced a kobject_put but failed to remove the kmem_cache_free beneath it, leading to a double free. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe --- diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 885cbb59967e..54bcba6c02a7 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -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);