Patch "net/mlx5: Fix vport QoS cleanup on error" has been added to the 6.13-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/mlx5: Fix vport QoS cleanup on error

to the 6.13-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-mlx5-fix-vport-qos-cleanup-on-error.patch
and it can be found in the queue-6.13 subdirectory.

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



commit 7d5e053b99e7e065fe4175eea175834bf9551250
Author: Carolina Jubran <cjubran@xxxxxxxxxx>
Date:   Tue Feb 25 09:26:06 2025 +0200

    net/mlx5: Fix vport QoS cleanup on error
    
    [ Upstream commit 7f3528f7d2f98b70e19a6bb7b130fc82c079ac54 ]
    
    When enabling vport QoS fails, the scheduling node was never freed,
    causing a leak.
    
    Add the missing free and reset the vport scheduling node pointer to
    NULL.
    
    Fixes: be034baba83e ("net/mlx5: Make vport QoS enablement more flexible for future extensions")
    Signed-off-by: Carolina Jubran <cjubran@xxxxxxxxxx>
    Reviewed-by: Cosmin Ratiu <cratiu@xxxxxxxxxx>
    Reviewed-by: Dragos Tatulea <dtatulea@xxxxxxxxxx>
    Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
    Link: https://patch.msgid.link/20250225072608.526866-2-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/esw/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
index 8b7c843446e11..07a28073a49ea 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
@@ -591,8 +591,11 @@ static int mlx5_esw_qos_vport_enable(struct mlx5_vport *vport, enum sched_node_t
 	sched_node->vport = vport;
 	vport->qos.sched_node = sched_node;
 	err = esw_qos_vport_enable(vport, parent, extack);
-	if (err)
+	if (err) {
+		__esw_qos_free_node(sched_node);
 		esw_qos_put(esw);
+		vport->qos.sched_node = NULL;
+	}
 
 	return err;
 }




[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