Skip to content

Commit 8fb8a82

Browse files
dTenebraerleon
authored andcommitted
RDMA/cxgb4: Check skb value for failure to allocate
get_skb() can fail to allocate skb, so check it. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 5be78ee ("RDMA/cxgb4: Fix LE hash collision bug for active open connection") Signed-off-by: Artem Chernyshev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 53a3f77 commit 8fb8a82

File tree

1 file changed

+3
-0
lines changed
  • drivers/infiniband/hw/cxgb4

1 file changed

+3
-0
lines changed

drivers/infiniband/hw/cxgb4/cm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,6 +1965,9 @@ static int send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid)
19651965
int win;
19661966

19671967
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
1968+
if (!skb)
1969+
return -ENOMEM;
1970+
19681971
req = __skb_put_zero(skb, sizeof(*req));
19691972
req->op_compl = htonl(WR_OP_V(FW_OFLD_CONNECTION_WR));
19701973
req->len16_pkd = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*req), 16)));

0 commit comments

Comments
 (0)