Message ID | 20210429092741.266533-1-gi-oh.kim@ionos.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | RDMA/rtrs: fix uninitialized symbol 'cnt' | expand |
On 4/29/21 3:27 AM, Gioh Kim wrote: > rtrs_clt_rdma_cq_direct returns an ninitialized value in cnt > if there is no session. This patch makes rtrs_clt_rdma_cq_direct > returns a negative value for block layer not to try again. Applied, thanks.
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c index b74a872387c4..934a2ff18e7f 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c @@ -2896,7 +2896,8 @@ EXPORT_SYMBOL(rtrs_clt_request); int rtrs_clt_rdma_cq_direct(struct rtrs_clt *clt, unsigned int index) { - int cnt; + /* If no path, return -1 for block layer not to try again */ + int cnt = -1; struct rtrs_con *con; struct rtrs_clt_sess *sess; struct path_it it;