[PATCH 1/7] nvme-tcp: fix bogus request completion when failing to send AER

Chaitanya Kulkarni chaitanyak at nvidia.com
Mon Feb 14 02:52:27 PST 2022


On 2/14/22 01:07, Sagi Grimberg wrote:
> AER is not backed by a real request, hence we should not incorrectly
> assume that when failing to send a nvme command, it is a normal request
> but rather check if this is an aer and if so complete the aer (similar
> to the normal completion path).
> 
> Cc: stable at vger.kernel.org
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>


I think same patch is already present in the nvme-5.17 see [1]:-

root at dev nvme (nvme-5.17) # grep "void nvme_tcp_fail_request" -A 15 
host/tcp.c
static void nvme_tcp_fail_request(struct nvme_tcp_request *req)
{
	if (nvme_tcp_async_req(req)) {
		union nvme_result res = {};

		nvme_complete_async_event(&req->queue->ctrl->ctrl,
				cpu_to_le16(NVME_SC_HOST_PATH_ERROR), &res);
	} else {
		nvme_tcp_end_request(blk_mq_rq_from_pdu(req),
				NVME_SC_HOST_PATH_ERROR);
	}
}

static int nvme_tcp_try_send_data(struct nvme_tcp_request *req)
{
	struct nvme_tcp_queue *queue = req->queue;



[1] 
http://lists.infradead.org/pipermail/linux-nvme/2022-February/029803.html

commit 63573807b27e0faf8065a28b1bbe1cbfb23c0130 (tag: 
nvme-5.17-2022-02-10, origin/nvme-5.17)
Author: Sagi Grimberg <sagi at grimberg.me>
Date:   Mon Feb 7 00:40:13 2022 +0200

     nvme-tcp: fix bogus request completion when failing to send AER

     AER is not backed by a real request, hence we should not incorrectly
     assume that when failing to send a nvme command, it is a normal request
     but rather check if this is an aer and if so complete the aer (similar
     to the normal completion path).

     Cc: stable at vger.kernel.org
     Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
     Reviewed-by: Hannes Reinecke <hare at suse.de>
     Signed-off-by: Christoph Hellwig <hch at lst.de>


-ck




More information about the Linux-nvme mailing list