Patch "RDMA/qedr: Fix error return code in qedr_iw_connect()" has been added to the 5.10-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

    RDMA/qedr: Fix error return code in qedr_iw_connect()

to the 5.10-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:
     rdma-qedr-fix-error-return-code-in-qedr_iw_connect.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 88e001b73345e481694465c676281d333e4e1210
Author: Wang Wensheng <wangwensheng4@xxxxxxxxxx>
Date:   Thu Apr 8 11:31:35 2021 +0000

    RDMA/qedr: Fix error return code in qedr_iw_connect()
    
    [ Upstream commit 10dd83dbcd157baf7a78a09ddb2f84c627bc7f1d ]
    
    Fix to return a negative error code from the error handling case instead
    of 0, as done elsewhere in this function.
    
    Fixes: 82af6d19d8d9 ("RDMA/qedr: Fix synchronization methods and memory leaks in qedr")
    Link: https://lore.kernel.org/r/20210408113135.92165-1-wangwensheng4@xxxxxxxxxx
    Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
    Signed-off-by: Wang Wensheng <wangwensheng4@xxxxxxxxxx>
    Acked-by: Michal Kalderon <michal.kalderon@xxxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/hw/qedr/qedr_iw_cm.c b/drivers/infiniband/hw/qedr/qedr_iw_cm.c
index c4bc58736e48..1715fbe0719d 100644
--- a/drivers/infiniband/hw/qedr/qedr_iw_cm.c
+++ b/drivers/infiniband/hw/qedr/qedr_iw_cm.c
@@ -636,8 +636,10 @@ int qedr_iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
 	memcpy(in_params.local_mac_addr, dev->ndev->dev_addr, ETH_ALEN);
 
 	if (test_and_set_bit(QEDR_IWARP_CM_WAIT_FOR_CONNECT,
-			     &qp->iwarp_cm_flags))
+			     &qp->iwarp_cm_flags)) {
+		rc = -ENODEV;
 		goto err; /* QP already being destroyed */
+	}
 
 	rc = dev->ops->iwarp_connect(dev->rdma_ctx, &in_params, &out_params);
 	if (rc) {



[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