Re: [PATCH net] net/mana: Null service_wq on setup error to prevent double destroy
From: Simon Horman
Date: Wed Mar 11 2026 - 13:06:35 EST
On Mon, Mar 09, 2026 at 10:24:43AM -0700, Konstantin Taranov wrote:
> From: Shiraz Saleem <shirazsaleem@xxxxxxxxxxxxx>
>
> In mana_gd_setup() error path, set gc->service_wq to NULL after
> destroy_workqueue() to match the cleanup in mana_gd_cleanup().
> This prevents a use-after-free if the workqueue pointer is checked
> after a failed setup.
>
> Fixes: f975a0955276 ("net: mana: Fix double destroy_workqueue on service rescan PCI path")
> Signed-off-by: Shiraz Saleem <shirazsaleem@xxxxxxxxxxxxx>
> Signed-off-by: Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>