Skip to content

Commit e7c8974

Browse files
committed
RDMA/cxgb4: Check skb value for failure to allocate
JIRA: https://issues.redhat.com/browse/RHEL-61394 commit 8fb8a82 Author: Artem Chernyshev <artem.chernyshev@red-soft.ru> Date: Tue Sep 5 15:40:48 2023 +0300 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 <artem.chernyshev@red-soft.ru> Link: https://lore.kernel.org/r/20230905124048.284165-1-artem.chernyshev@red-soft.ru Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Kamal Heib <kheib@redhat.com>
1 parent 0bf6b29 commit e7c8974

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)