Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eric Biggers and committed by
Jens Axboe
3e20aa96 bfe373f6

+1 -2
+1 -2
block/keyslot-manager.c
··· 374 374 if (!ksm) 375 375 return; 376 376 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); 379 378 memzero_explicit(ksm, sizeof(*ksm)); 380 379 } 381 380 EXPORT_SYMBOL_GPL(blk_ksm_destroy);