Patch "RDMA/cxgb4: Check skb value for failure to allocate" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    RDMA/cxgb4: Check skb value for failure to allocate

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rdma-cxgb4-check-skb-value-for-failure-to-allocate.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ae61db5d928ecbc633f47c22c641b68ab7470181
Author: Artem Chernyshev <artem.chernyshev@xxxxxxxxxxx>
Date:   Tue Sep 5 15:40:48 2023 +0300

    RDMA/cxgb4: Check skb value for failure to allocate
    
    [ Upstream commit 8fb8a82086f5bda6893ea6557c5a458e4549c6d7 ]
    
    get_skb() can fail to allocate skb, so check it.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 5be78ee924ae ("RDMA/cxgb4: Fix LE hash collision bug for active open connection")
    Signed-off-by: Artem Chernyshev <artem.chernyshev@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230905124048.284165-1-artem.chernyshev@xxxxxxxxxxx
    Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index ced615b5ea096..040ba2224f9ff 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -1965,6 +1965,9 @@ static int send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid)
 	int win;
 
 	skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
+	if (!skb)
+		return -ENOMEM;
+
 	req = __skb_put_zero(skb, sizeof(*req));
 	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)));



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux