Re: [PATCH net v1] net/mlx5: Fix eswitch offloads cleanup on QoS init failure
From: Simon Horman
Date: Tue Apr 28 2026 - 14:12:19 EST
On Sat, Apr 25, 2026 at 01:29:59AM +0100, Prathamesh Deshpande wrote:
> If mlx5_esw_qos_init() fails after esw_offloads_init() succeeds,
> mlx5_eswitch_init() jumps to reps_err and skips esw_offloads_cleanup(),
> leaking the offloads initialization state.
>
> Add a dedicated unwind label for QoS init failure that cleans up
> offloads before continuing the existing vport and outer eswitch cleanup.
>
> Fixes: cac7356c653d ("net/mlx5: Rework esw qos domain init and cleanup")
> Signed-off-by: Prathamesh Deshpande <prathameshdeshpande7@xxxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>