summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2010-10-15 15:49:18 +0200
committerJens Axboe <jaxboe@fusionio.com>2010-10-15 15:49:18 +0200
commite817bf3f68f55e7307c3e9abe5f32d0c05c83988 (patch)
tree0280cb83bb13b00d64af3cfc5960fcdd2a5343ba /block
parent892b6f90db81cccb723d5d92f4fddc2d68b206e1 (diff)
downloadlinux-e817bf3f68f55e7307c3e9abe5f32d0c05c83988.tar.gz
linux-e817bf3f68f55e7307c3e9abe5f32d0c05c83988.tar.bz2
linux-e817bf3f68f55e7307c3e9abe5f32d0c05c83988.zip
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 <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-integrity.c1
1 files changed, 0 insertions, 1 deletions
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);