diff options
author | Eric Biggers <ebiggers@google.com> | 2020-06-16 18:56:54 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-29 22:24:05 +0300 |
commit | 3e20aa9630e5bcef4f1b9dcb7b50c5491867fd89 (patch) | |
tree | 8e97a2cfa84a2a6dd066daaf8eee7982f2887abd /block/keyslot-manager.c | |
parent | bfe373f608cf81b7626dfeb904001b0e867c5110 (diff) | |
download | linux-3e20aa9630e5bcef4f1b9dcb7b50c5491867fd89.tar.xz |
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 <ebiggers@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/keyslot-manager.c')
-rw-r--r-- | block/keyslot-manager.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/keyslot-manager.c b/block/keyslot-manager.c index c2ef41b3147b..35abcb1ec051 100644 --- a/block/keyslot-manager.c +++ b/block/keyslot-manager.c @@ -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); |