Patch "RDMA/core: Fix corrupted SL on passive side" 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/core: Fix corrupted SL on passive side

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-core-fix-corrupted-sl-on-passive-side.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 be03e8adb04cbdadb86d105797f27e1eb504900b
Author: HÃ¥kon Bugge <haakon.bugge@xxxxxxxxxx>
Date:   Mon Mar 22 14:35:32 2021 +0100

    RDMA/core: Fix corrupted SL on passive side
    
    [ Upstream commit 194f64a3cad3ab9e381e996a13089de3215d1887 ]
    
    On RoCE systems, a CM REQ contains a Primary Hop Limit > 1 and Primary
    Subnet Local is zero.
    
    In cm_req_handler(), the cm_process_routed_req() function is called. Since
    the Primary Subnet Local value is zero in the request, and since this is
    RoCE (Primary Local LID is permissive), the following statement will be
    executed:
    
          IBA_SET(CM_REQ_PRIMARY_SL, req_msg, wc->sl);
    
    This corrupts SL in req_msg if it was different from zero. In other words,
    a request to setup a connection using an SL != zero, will not be honored,
    and a connection using SL zero will be created instead.
    
    Fixed by not calling cm_process_routed_req() on RoCE systems, the
    cm_process_route_req() is only for IB anyhow.
    
    Fixes: 3971c9f6dbf2 ("IB/cm: Add interim support for routed paths")
    Link: https://lore.kernel.org/r/1616420132-31005-1-git-send-email-haakon.bugge@xxxxxxxxxx
    Signed-off-by: HÃ¥kon Bugge <haakon.bugge@xxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index bbba0cd42c89..ee568bdf3c78 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -2137,7 +2137,8 @@ static int cm_req_handler(struct cm_work *work)
 		goto destroy;
 	}
 
-	cm_process_routed_req(req_msg, work->mad_recv_wc->wc);
+	if (cm_id_priv->av.ah_attr.type != RDMA_AH_ATTR_TYPE_ROCE)
+		cm_process_routed_req(req_msg, work->mad_recv_wc->wc);
 
 	memset(&work->path[0], 0, sizeof(work->path[0]));
 	if (cm_req_has_alt_path(req_msg))



[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