]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
idpf: cancel mailbox work in error path
authorPavan Kumar Linga <pavan.kumar.linga@intel.com>
Mon, 23 Oct 2023 20:26:55 +0000 (13:26 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 23 Oct 2023 22:55:31 +0000 (15:55 -0700)
In idpf_vc_core_init, the mailbox work is queued
on a mailbox workqueue but it is not cancelled on error.
This results in a call trace when idpf_mbx_task tries
to access the freed mailbox queue pointer. Fix it by
cancelling the mailbox work in the error path.

Fixes: 4930fbf419a7 ("idpf: add core init and interrupt request")
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20231023202655.173369-3-jacob.e.keller@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c

index e276b5360c2ed81be070f7a01b4e0b9cb3a8c06f..2c1b051fdc0d4868def4420ec099972740a5109a 100644 (file)
@@ -3146,6 +3146,7 @@ restart:
 
 err_intr_req:
        cancel_delayed_work_sync(&adapter->serv_task);
+       cancel_delayed_work_sync(&adapter->mbx_task);
        idpf_vport_params_buf_rel(adapter);
 err_netdev_alloc:
        kfree(adapter->vports);