Patch "ixgbe, xsk: clean up the resources in ixgbe_xsk_pool_enable error path" has been added to the 5.10-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

    ixgbe, xsk: clean up the resources in ixgbe_xsk_pool_enable error path

to the 5.10-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:
     ixgbe-xsk-clean-up-the-resources-in-ixgbe_xsk_pool_e.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 46369460f0752e5cb0486d0703870cbf6c059021
Author: Wang Hai <wanghai38@xxxxxxxxxx>
Date:   Tue Aug 17 13:37:36 2021 -0700

    ixgbe, xsk: clean up the resources in ixgbe_xsk_pool_enable error path
    
    [ Upstream commit 1b80fec7b043552e01609bae7d0aad07aa742adc ]
    
    In ixgbe_xsk_pool_enable(), if ixgbe_xsk_wakeup() fails,
    We should restore the previous state and clean up the
    resources. Add the missing clear af_xdp_zc_qps and unmap dma
    to fix this bug.
    
    Fixes: d49e286d354e ("ixgbe: add tracking of AF_XDP zero-copy state for each queue pair")
    Fixes: 4a9b32f30f80 ("ixgbe: fix potential RX buffer starvation for AF_XDP")
    Signed-off-by: Wang Hai <wanghai38@xxxxxxxxxx>
    Acked-by: Magnus Karlsson <magnus.karlsson@xxxxxxxxx>
    Tested-by: Sandeep Penigalapati <sandeep.penigalapati@xxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20210817203736.3529939-1-anthony.l.nguyen@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
index f72d2978263b..d60da7a89092 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
@@ -52,8 +52,11 @@ static int ixgbe_xsk_pool_enable(struct ixgbe_adapter *adapter,
 
 		/* Kick start the NAPI context so that receiving will start */
 		err = ixgbe_xsk_wakeup(adapter->netdev, qid, XDP_WAKEUP_RX);
-		if (err)
+		if (err) {
+			clear_bit(qid, adapter->af_xdp_zc_qps);
+			xsk_pool_dma_unmap(pool, IXGBE_RX_DMA_ATTR);
 			return err;
+		}
 	}
 
 	return 0;



[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