Patch "RDMA/rxe: Handle skb_clone() failure in rxe_recv.c" has been added to the 5.8-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/rxe: Handle skb_clone() failure in rxe_recv.c

to the 5.8-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-rxe-handle-skb_clone-failure-in-rxe_recv.c.patch
and it can be found in the queue-5.8 subdirectory.

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



commit b56ac3f59e1ee99d6929e96bec07035edc9cf6e5
Author: Bob Pearson <rpearsonhpe@xxxxxxxxx>
Date:   Tue Oct 13 13:42:37 2020 -0500

    RDMA/rxe: Handle skb_clone() failure in rxe_recv.c
    
    [ Upstream commit 71abf20b28ff87fee6951ec2218d5ce7969c4e87 ]
    
    If skb_clone() is unable to allocate memory for a new sk_buff this is not
    detected by the current code.
    
    Check for a NULL return and continue. This is similar to other errors in
    this loop over QPs attached to the multicast address and consistent with
    the unreliable UD transport.
    
    Fixes: e7ec96fc7932f ("RDMA/rxe: Fix skb lifetime in rxe_rcv_mcast_pkt()")
    Addresses-Coverity-ID: 1497804: Null pointer dereferences (NULL_RETURNS)
    Link: https://lore.kernel.org/r/20201013184236.5231-1-rpearson@xxxxxxx
    Signed-off-by: Bob Pearson <rpearson@xxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c b/drivers/infiniband/sw/rxe/rxe_recv.c
index be6416a982c70..9bfb98056fc2a 100644
--- a/drivers/infiniband/sw/rxe/rxe_recv.c
+++ b/drivers/infiniband/sw/rxe/rxe_recv.c
@@ -319,6 +319,9 @@ static void rxe_rcv_mcast_pkt(struct rxe_dev *rxe, struct sk_buff *skb)
 		else
 			per_qp_skb = skb;
 
+		if (unlikely(!per_qp_skb))
+			continue;
+
 		per_qp_pkt = SKB_TO_PKT(per_qp_skb);
 		per_qp_pkt->qp = qp;
 		rxe_add_ref(qp);



[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