]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/mana: Null service_wq on setup error to prevent double destroy
authorShiraz Saleem <shirazsaleem@microsoft.com>
Mon, 9 Mar 2026 17:24:43 +0000 (10:24 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Mar 2026 03:21:45 +0000 (20:21 -0700)
commit87c2302813abc55c46485711a678e3c312b00666
tree6e053ef56cbbaa147636ff89b722c5bdb97e5052
parentead054054874d7de4c1724e18c1adf90fdb5d7db
net/mana: Null service_wq on setup error to prevent double destroy

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@microsoft.com>
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260309172443.688392-1-kotaranov@linux.microsoft.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microsoft/mana/gdma_main.c