Patch "ice: Don't tx before switchdev is fully configured" has been added to the 6.5-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

    ice: Don't tx before switchdev is fully configured

to the 6.5-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:
     ice-don-t-tx-before-switchdev-is-fully-configured.patch
and it can be found in the queue-6.5 subdirectory.

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



commit ebb447d1c2e9383a5b770215de9817a45dd1120e
Author: Wojciech Drewek <wojciech.drewek@xxxxxxxxx>
Date:   Wed Jul 12 13:03:28 2023 +0200

    ice: Don't tx before switchdev is fully configured
    
    [ Upstream commit 7aa529a69e92b9aff585e569d5003f7c15d8d60b ]
    
    There is possibility that ice_eswitch_port_start_xmit might be
    called while some resources are still not allocated which might
    cause NULL pointer dereference. Fix this by checking if switchdev
    configuration was finished.
    
    Reviewed-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
    Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>
    Signed-off-by: Wojciech Drewek <wojciech.drewek@xxxxxxxxx>
    Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@xxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c b/drivers/net/ethernet/intel/ice/ice_eswitch.c
index 8f232c41a89e3..459e32f6adb50 100644
--- a/drivers/net/ethernet/intel/ice/ice_eswitch.c
+++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c
@@ -331,6 +331,9 @@ ice_eswitch_port_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 	np = netdev_priv(netdev);
 	vsi = np->vsi;
 
+	if (!vsi || !ice_is_switchdev_running(vsi->back))
+		return NETDEV_TX_BUSY;
+
 	if (ice_is_reset_in_progress(vsi->back->state) ||
 	    test_bit(ICE_VF_DIS, vsi->back->state))
 		return NETDEV_TX_BUSY;



[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