Skip to content

Commit 3e20aa9

Browse files
ebiggersaxboe
authored andcommitted
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]>
1 parent bfe373f commit 3e20aa9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

block/keyslot-manager.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,7 @@ void blk_ksm_destroy(struct blk_keyslot_manager *ksm)
374374
if (!ksm)
375375
return;
376376
kvfree(ksm->slot_hashtable);
377-
memzero_explicit(ksm->slots, sizeof(ksm->slots[0]) * ksm->num_slots);
378-
kvfree(ksm->slots);
377+
kvfree_sensitive(ksm->slots, sizeof(ksm->slots[0]) * ksm->num_slots);
379378
memzero_explicit(ksm, sizeof(*ksm));
380379
}
381380
EXPORT_SYMBOL_GPL(blk_ksm_destroy);

0 commit comments

Comments
 (0)