]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme-auth: use kvfree() for memory allocated with kvcalloc()
authorIsrael Rukshin <israelr@nvidia.com>
Sun, 23 Nov 2025 14:46:48 +0000 (16:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:36 +0000 (14:03 +0100)
commit6a960b58df612dec4ca8a85c53019b2bfb70f061
tree284d5297a511c8da37d8b6b613b1ad004c34d69f
parent7193407bc4457212fa38ec3aff9c640e63a8dbef
nvme-auth: use kvfree() for memory allocated with kvcalloc()

[ Upstream commit bb9f4cca7c031de6f0e85f7ba24abf0172829f85 ]

Memory allocated by kvcalloc() may come from vmalloc or kmalloc,
so use kvfree() instead of kfree() for proper deallocation.

Fixes: aa36d711e945 ("nvme-auth: convert dhchap_auth_list to an array")
Signed-off-by: Israel Rukshin <israelr@nvidia.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/auth.c