mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
RDMA/cxgb4: Check skb value for failure to allocate
[ Upstream commit8fb8a82086] get_skb() can fail to allocate skb, so check it. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes:5be78ee924("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: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f175665385
commit
3aade96e0c
@@ -1965,6 +1965,9 @@ static int send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid)
|
|||||||
int win;
|
int win;
|
||||||
|
|
||||||
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
|
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
|
||||||
|
if (!skb)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
req = __skb_put_zero(skb, sizeof(*req));
|
req = __skb_put_zero(skb, sizeof(*req));
|
||||||
req->op_compl = htonl(WR_OP_V(FW_OFLD_CONNECTION_WR));
|
req->op_compl = htonl(WR_OP_V(FW_OFLD_CONNECTION_WR));
|
||||||
req->len16_pkd = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*req), 16)));
|
req->len16_pkd = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*req), 16)));
|
||||||
|
|||||||
Reference in New Issue
Block a user