Patch "octeontx2-pf: Add error handling to VLAN unoffload handling" has been added to the 6.6-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

    octeontx2-pf: Add error handling to VLAN unoffload handling

to the 6.6-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:
     octeontx2-pf-add-error-handling-to-vlan-unoffload-ha.patch
and it can be found in the queue-6.6 subdirectory.

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



commit c63753e59b3c35f373976ea8ea625b47bfb36bc2
Author: Simon Horman <horms@xxxxxxxxxx>
Date:   Mon Jun 17 17:50:26 2024 +0100

    octeontx2-pf: Add error handling to VLAN unoffload handling
    
    [ Upstream commit b95a4afe2defd6f46891985f9436a568cd35a31c ]
    
    otx2_sq_append_skb makes used of __vlan_hwaccel_push_inside()
    to unoffload VLANs - push them from skb meta data into skb data.
    However, it omitts a check for __vlan_hwaccel_push_inside()
    returning NULL.
    
    Found by inspection based on [1] and [2].
    Compile tested only.
    
    [1] Re: [PATCH net-next v1] net: stmmac: Enable TSO on VLANs
        https://lore.kernel.org/all/ZmrN2W8Fye450TKs@xxxxxxxxxxxxxxxxxxxxx/
    [2] Re: [PATCH net-next v2] net: stmmac: Enable TSO on VLANs
        https://lore.kernel.org/all/CANn89i+11L5=tKsa7V7Aeyxaj6nYGRwy35PAbCRYJ73G+b25sg@xxxxxxxxxxxxxx/
    
    Fixes: fd9d7859db6c ("octeontx2-pf: Implement ingress/egress VLAN offload")
    Signed-off-by: Simon Horman <horms@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
index f828d32737af0..04a49b9b545f3 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
@@ -1171,8 +1171,11 @@ bool otx2_sq_append_skb(struct net_device *netdev, struct otx2_snd_queue *sq,
 
 	if (skb_shinfo(skb)->gso_size && !is_hw_tso_supported(pfvf, skb)) {
 		/* Insert vlan tag before giving pkt to tso */
-		if (skb_vlan_tag_present(skb))
+		if (skb_vlan_tag_present(skb)) {
 			skb = __vlan_hwaccel_push_inside(skb);
+			if (!skb)
+				return true;
+		}
 		otx2_sq_append_tso(pfvf, sq, skb, qidx);
 		return true;
 	}




[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