linux-stable/drivers/infiniband/ulp
Dan Carpenter b386cd65d9 RDMA/rtrs: Fix some signedness bugs in error handling
The problem is that "req->sg_cnt" is an unsigned int so if "nr" is
negative, it gets type promoted to a high positive value and the condition
is false.  This patch fixes it by handling negatives separately.

Fixes: 6a98d71dae ("RDMA/rtrs: client: main functionality")
Link: https://lore.kernel.org/r/20200519133223.GN2078@kadam
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-05-19 20:40:20 -03:00
..
ipoib RDMA: Allow ib_client's to fail when add() is called 2020-05-06 11:57:33 -03:00
iser IB/iser: Always check sig MR before putting it to the free pool 2020-03-26 16:46:54 -03:00
isert scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout" 2020-02-14 17:13:53 -05:00
opa_vnic RDMA: Allow ib_client's to fail when add() is called 2020-05-06 11:57:33 -03:00
rtrs RDMA/rtrs: Fix some signedness bugs in error handling 2020-05-19 20:40:20 -03:00
srp RDMA: Allow ib_client's to fail when add() is called 2020-05-06 11:57:33 -03:00
srpt RDMA/srpt: Fix disabling device management 2020-05-17 20:43:19 -03:00
Makefile RDMA/rtrs: include client and server modules into kernel compilation 2020-05-17 18:57:15 -03:00