Skip to content

Commit

Permalink
block: Fix double free in blk_integrity_unregister
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
martinkpetersen authored and Jens Axboe committed Oct 15, 2010
1 parent 892b6f9 commit e817bf3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion block/blk-integrity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit e817bf3

Please sign in to comment.