Patch "ibmvnic: Free any outstanding tx skbs during scrq reset" 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

    ibmvnic: Free any outstanding tx skbs during scrq reset

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:
     ibmvnic-free-any-outstanding-tx-skbs-during-scrq-res.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 4fd37063548fb9cdf66d202d9c52ecc47f2b7343
Author: Nick Child <nnac123@xxxxxxxxxxxxx>
Date:   Thu Jun 20 10:23:12 2024 -0500

    ibmvnic: Free any outstanding tx skbs during scrq reset
    
    [ Upstream commit 49bbeb5719c2f56907d3a9623b47c6c15c2c431d ]
    
    There are 2 types of outstanding tx skb's:
    Type 1: Packets that are sitting in the drivers ind_buff that are
    waiting to be batch sent to the NIC. During a device reset, these are
    freed with a call to ibmvnic_tx_scrq_clean_buffer()
    Type 2: Packets that have been sent to the NIC and are awaiting a TX
    completion IRQ. These are free'd during a reset with a call to
    clean_tx_pools()
    
    During any reset which requires us to free the tx irq, ensure that the
    Type 2 skb references are freed. Since the irq is released, it is
    impossible for the NIC to inform of any completions.
    
    Furthermore, later in the reset process is a call to init_tx_pools()
    which marks every entry in the tx pool as free (ie not outstanding).
    So if the driver is to make a call to init_tx_pools(), it must first
    be sure that the tx pool is empty of skb references.
    
    This issue was discovered by observing the following in the logs during
    EEH testing:
            TX free map points to untracked skb (tso_pool 0 idx=4)
            TX free map points to untracked skb (tso_pool 0 idx=5)
            TX free map points to untracked skb (tso_pool 1 idx=36)
    
    Fixes: 65d6470d139a ("ibmvnic: clean pending indirect buffs during reset")
    Signed-off-by: Nick Child <nnac123@xxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index cdf5251e56795..ca21e55335b23 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -4057,6 +4057,12 @@ static void release_sub_crqs(struct ibmvnic_adapter *adapter, bool do_h_free)
 		adapter->num_active_tx_scrqs = 0;
 	}
 
+	/* Clean any remaining outstanding SKBs
+	 * we freed the irq so we won't be hearing
+	 * from them
+	 */
+	clean_tx_pools(adapter);
+
 	if (adapter->rx_scrq) {
 		for (i = 0; i < adapter->num_active_rx_scrqs; i++) {
 			if (!adapter->rx_scrq[i])




[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