Skip to content

Commit

Permalink
RDMA/rtrs-clt: Missing error from rtrs_rdma_conn_established
Browse files Browse the repository at this point in the history
[ Upstream commit f553e76 ]

When rtrs_rdma_conn_established returns error (non-zero value), the error
value is stored in con->cm_err and it cannot trigger
rtrs_rdma_error_recovery. Finally the error of rtrs_rdma_con_established
will be forgot.

Fixes: 6a98d71 ("RDMA/rtrs: client: main functionality")
Link: https://lore.kernel.org/r/20201023074353.21946-5-jinpu.wang@cloud.ionos.com
Signed-off-by: Gioh Kim <gi-oh.kim@cloud.ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Gioh Kim authored and gregkh committed Dec 30, 2020
1 parent 78bd070 commit 4f64797
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/infiniband/ulp/rtrs/rtrs-clt.c
Expand Up @@ -1835,8 +1835,8 @@ static int rtrs_clt_rdma_cm_handler(struct rdma_cm_id *cm_id,
cm_err = rtrs_rdma_route_resolved(con);
break;
case RDMA_CM_EVENT_ESTABLISHED:
con->cm_err = rtrs_rdma_conn_established(con, ev);
if (likely(!con->cm_err)) {
cm_err = rtrs_rdma_conn_established(con, ev);
if (likely(!cm_err)) {
/*
* Report success and wake up. Here we abuse state_wq,
* i.e. wake up without state change, but we set cm_err.
Expand Down

0 comments on commit 4f64797

Please sign in to comment.