Re: [PATCH 1/4] nvmet: fix return status of RMI log page on allocation failure

Christoph Hellwig <[email protected]> Wed, 29 Jul 2026 13:32:31 +0200
Newsgroups org.infradead.lists.linux-nvme
Message-ID <[email protected]>
On Wed, Jul 29, 2026 at 06:56:07PM +0800, Guixin Liu wrote:
> nvmet_execute_get_log_page_rmi() leaves 'status' holding NVME_SC_SUCCESS
> (set by the successful nvmet_req_find_ns() call) when the kzalloc() for
> the log buffer fails. It then jumps to the out label and completes the
> request with a success status, so the host is told the command succeeded
> while no data was transferred.
> 
> Initialize 'status' to NVME_SC_INTERNAL, matching the smart log handler,
> so an allocation failure is reported as an internal error.
> 
> Fixes: 5fd075cdaf36 ("nvmet: implement rotational media information log")
> Signed-off-by: Guixin Liu <[email protected]>

Looks good:

Reviewed-by: Christoph Hellwig <[email protected]>