提交 3839e4b2 编写于 作者: X Xiaotian Feng 提交者: Jens Axboe

block: fix improper kobject release in blk_integrity_unregister

blk_integrity_unregister should use kobject_put to release the kobject,
otherwise after bi is freed, memory of bi->kobj->name is leaked.
Signed-off-by: NXiaotian Feng <dfeng@redhat.com>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 a4e7d464
......@@ -379,6 +379,7 @@ 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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册