Patch "net: qrtr: Update packets cloning when broadcasting" has been added to the 4.19-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

    net: qrtr: Update packets cloning when broadcasting

to the 4.19-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:
     net-qrtr-update-packets-cloning-when-broadcasting.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 001a4b0b071c3b92241465abedf6084f6d2b361d
Author: Youssef Samir <quic_yabdulra@xxxxxxxxxxx>
Date:   Mon Sep 16 19:08:58 2024 +0200

    net: qrtr: Update packets cloning when broadcasting
    
    [ Upstream commit f011b313e8ebd5b7abd8521b5119aecef403de45 ]
    
    When broadcasting data to multiple nodes via MHI, using skb_clone()
    causes all nodes to receive the same header data. This can result in
    packets being discarded by endpoints, leading to lost data.
    
    This issue occurs when a socket is closed, and a QRTR_TYPE_DEL_CLIENT
    packet is broadcasted. All nodes receive the same destination node ID,
    causing the node connected to the client to discard the packet and
    remain unaware of the client's deletion.
    
    Replace skb_clone() with pskb_copy(), to create a separate copy of
    the header for each sk_buff.
    
    Fixes: bdabad3e363d ("net: Add Qualcomm IPC router")
    Signed-off-by: Youssef Samir <quic_yabdulra@xxxxxxxxxxx>
    Reviewed-by: Jeffery Hugo <quic_jhugo@xxxxxxxxxxx>
    Reviewed-by: Carl Vanderlip <quic_carlv@xxxxxxxxxxx>
    Reviewed-by: Chris Lew <quic_clew@xxxxxxxxxxx>
    Link: https://patch.msgid.link/20240916170858.2382247-1-quic_yabdulra@xxxxxxxxxxx
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c
index 128d0a48478d1..890a8fe51a9af 100644
--- a/net/qrtr/qrtr.c
+++ b/net/qrtr/qrtr.c
@@ -718,7 +718,7 @@ static int qrtr_bcast_enqueue(struct qrtr_node *node, struct sk_buff *skb,
 
 	mutex_lock(&qrtr_node_lock);
 	list_for_each_entry(node, &qrtr_all_nodes, item) {
-		skbn = skb_clone(skb, GFP_KERNEL);
+		skbn = pskb_copy(skb, GFP_KERNEL);
 		if (!skbn)
 			break;
 		skb_set_owner_w(skbn, skb->sk);




[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