[PATCH] net/mlx5: fix Rx queue control deref
Raslan Darawsheh
rasland at nvidia.com
Tue Nov 26 09:09:38 CET 2024
Hi,
From: Bing Zhao <bingz at nvidia.com>
Sent: Monday, November 25, 2024 7:23 PM
To: Dariusz Sosnowski; Slava Ovsiienko; dev at dpdk.org; Raslan Darawsheh
Cc: Ori Kam; Suanming Mou; Matan Azrad; stable at dpdk.org
Subject: [PATCH] net/mlx5: fix Rx queue control deref
When the Rx queue is shared, only the control structure is shared and
the private structure of each Rx queue is still independent. During
the port stop stage, the hardware resource will be released, and the
memory will be freed in the device close stage. Then the control
structure reference count should be decreased when freeing a private
structure.
In the previous implementation, the decreasing action was wrongly
put inside the owners list empty condition. Indeed, they should be
in the same level. And since the reference count was set to 1 after
the 1st queue is created, when checking the value, it should be
subtracted firstly and then check the value.
With this commit, the reference calculation and condition checking
will be corrected. The shared Rx queues' control structures will be
freed successlly to avoid the crash in the port restarting.
Fixes: 3c9a82fa6edc ("net/mlx5: fix Rx queue control management")
Cc: stable at dpdk.org
Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
More information about the stable
mailing list