On 6/29/20 10:51 AM, Eric Biggers wrote: > On Tue, Jun 16, 2020 at 08:56:54AM -0700, Eric Biggers wrote: >> From: Eric Biggers <ebiggers@xxxxxxxxxx> >> >> 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@xxxxxxxxxx> >> --- >> block/keyslot-manager.c | 3 +-- >> 1 file changed, 1 insertion(+), 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); >> -- > > Ping? Applied, thanks. -- Jens Axboe