RDMA/rtrs: fix uninitialized symbol 'cnt'
Subsystems (3)
PATCH 1/1 RDMA/rtrs: fix uninitialized symbol 'cnt'
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.
Fixes 2958a995edc94 ("block/rnbd-clt: Support polling mode for IO latency optimization")
Reported-by kernel test robot <[email protected]>
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Gioh Kim <[email protected]>
Signed-off-by Jack Wang <[email protected]>
--- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/ulp/rtrs/rtrs-clt.c +2 -1
@@ -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;
Signature · 1 line
2.25.1
Quoted 3 lines · Gioh Kim
rtrs_clt_rdma_cq_directreturns an ninitialized value in cnt if there is no session. This patch makesrtrs_clt_rdma_cq_directreturns a negative value for block layer not to try again.
Applied, thanks.
Signature · 1 line
Jens Axboe