mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
block/keyslot-manager: use kvfree_sensitive()
Make blk_ksm_destroy() use the kvfree_sensitive() function (which was introduced in v5.8-rc1) instead of open-coding it. Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
1 parent
bfe373f608
commit
3e20aa9630
1 file changed
+1
-2
@@ -374,8 +374,7 @@ void blk_ksm_destroy(struct blk_keyslot_manager *ksm)
|
||||
if (!ksm)
|
||||
return;
|
||||
kvfree(ksm->slot_hashtable);
|
||||
memzero_explicit(ksm->slots, sizeof(ksm->slots[0]) * ksm->num_slots);
|
||||
kvfree(ksm->slots);
|
||||
kvfree_sensitive(ksm->slots, sizeof(ksm->slots[0]) * ksm->num_slots);
|
||||
memzero_explicit(ksm, sizeof(*ksm));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blk_ksm_destroy);
|
||||
|
||||
Reference in new issue
Block a user