net/mlx5: E-switch, Annotate esw state_lock mutex destroy
authorParav Pandit <parav@mellanox.com>
Wed, 18 Dec 2019 04:51:24 +0000 (22:51 -0600)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 13 Mar 2020 23:26:22 +0000 (16:26 -0700)
Invoke mutex_destroy() to catch any esw state_lock errors.

Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Bodong Wang <bodong@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

index 54e5334f02a7786edc7b1e2d9850e3c8c8603d88..8fc351240f4cfb098493d73df1070474e11159ab 100644 (file)
@@ -2239,6 +2239,7 @@ void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw)
        esw->dev->priv.eswitch = NULL;
        destroy_workqueue(esw->work_queue);
        esw_offloads_cleanup_reps(esw);
+       mutex_destroy(&esw->state_lock);
        mutex_destroy(&esw->offloads.mod_hdr.lock);
        mutex_destroy(&esw->offloads.encap_tbl_lock);
        kfree(esw->vports);