Patch "net/mlx5e: SHAMPO, Fix incorrect page release" has been added to the 6.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

    net/mlx5e: SHAMPO, Fix incorrect page release

to the 6.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:
     net-mlx5e-shampo-fix-incorrect-page-release.patch
and it can be found in the queue-6.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 fe344648704bd2f1908cdd8d03e8e4582c5609cc
Author: Dragos Tatulea <dtatulea@xxxxxxxxxx>
Date:   Tue Jun 4 00:22:07 2024 +0300

    net/mlx5e: SHAMPO, Fix incorrect page release
    
    [ Upstream commit 70bd03b89f20b9bbe51a7f73c4950565a17a45f7 ]
    
    Under the following conditions:
    1) No skb created yet
    2) header_size == 0 (no SHAMPO header)
    3) header_index + 1 % MLX5E_SHAMPO_WQ_HEADER_PER_PAGE == 0 (this is the
       last page fragment of a SHAMPO header page)
    
    a new skb is formed with a page that is NOT a SHAMPO header page (it
    is a regular data page). Further down in the same function
    (mlx5e_handle_rx_cqe_mpwrq_shampo()), a SHAMPO header page from
    header_index is released. This is wrong and it leads to SHAMPO header
    pages being released more than once.
    
    Signed-off-by: Dragos Tatulea <dtatulea@xxxxxxxxxx>
    Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240603212219.1037656-3-tariqt@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index cdc84a27a04e..0138f77eaeed 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -2369,7 +2369,8 @@ static void mlx5e_handle_rx_cqe_mpwrq_shampo(struct mlx5e_rq *rq, struct mlx5_cq
 	if (flush)
 		mlx5e_shampo_flush_skb(rq, cqe, match);
 free_hd_entry:
-	mlx5e_free_rx_shampo_hd_entry(rq, header_index);
+	if (likely(head_size))
+		mlx5e_free_rx_shampo_hd_entry(rq, header_index);
 mpwrq_cqe_out:
 	if (likely(wi->consumed_strides < rq->mpwqe.num_strides))
 		return;




[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