Re: [PATCH] nvme: fix memory allocator in nvme_pr_read_keys()
From: Christoph Hellwig
Date: Mon Feb 23 2026 - 08:46:35 EST
s/allocator/allocation/ in the subject.
> - rse = kzalloc(rse_len, GFP_KERNEL);
> + rse = kvzalloc(rse_len, GFP_KERNEL);
You'll also need it to free it using kvfree if you you use kvzalloc.
We might also want to add some upper bound to the number of keys
to not allow the user to allocate 4GB of pinned kernel memory.