Patch "nvme-rdma: fix error code in nvme_rdma_setup_ctrl" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    nvme-rdma: fix error code in nvme_rdma_setup_ctrl

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nvme-rdma-fix-error-code-in-nvme_rdma_setup_ctrl.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 91b6adc3885e49403c955fa80af2c241a05ffd89
Author: Max Gurtovoy <mgurtovoy@xxxxxxxxxx>
Date:   Sun Oct 17 11:58:16 2021 +0300

    nvme-rdma: fix error code in nvme_rdma_setup_ctrl
    
    [ Upstream commit 09748122009aed7bfaa7acc33c10c083a4758322 ]
    
    In case that icdoff is not zero or mandatory keyed sgls are not
    supported by the NVMe/RDMA target, we'll go to error flow but we'll
    return 0 to the caller. Fix it by returning an appropriate error code.
    
    Fixes: c66e2998c8ca ("nvme-rdma: centralize controller setup sequence")
    Signed-off-by: Max Gurtovoy <mgurtovoy@xxxxxxxxxx>
    Reviewed-by: Sagi Grimberg <sagi@xxxxxxxxxxx>
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 042c594bc57e2..0498801542eb6 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1095,11 +1095,13 @@ static int nvme_rdma_setup_ctrl(struct nvme_rdma_ctrl *ctrl, bool new)
 		return ret;
 
 	if (ctrl->ctrl.icdoff) {
+		ret = -EOPNOTSUPP;
 		dev_err(ctrl->ctrl.device, "icdoff is not supported!\n");
 		goto destroy_admin;
 	}
 
 	if (!(ctrl->ctrl.sgls & (1 << 2))) {
+		ret = -EOPNOTSUPP;
 		dev_err(ctrl->ctrl.device,
 			"Mandatory keyed sgls are not supported!\n");
 		goto destroy_admin;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux