lkml.org 
[lkml]   [2023]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH vfio 2/2] vfio/mlx5: Destroy the state_mutex on release
Date
The state_mutex is initialized in vfio init, but
never destroyed. This isn't required as mutex_destroy()
doesn't do anything unless lock debugging is enabled.
However, for completeness, fix it.

No fixes tag is added as it doesn't seem worthwhile
for such a trivial and debug only change.

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
---
drivers/vfio/pci/mlx5/cmd.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/vfio/pci/mlx5/cmd.c b/drivers/vfio/pci/mlx5/cmd.c
index 5cf68ab2bbd7..4ae5295757b4 100644
--- a/drivers/vfio/pci/mlx5/cmd.c
+++ b/drivers/vfio/pci/mlx5/cmd.c
@@ -203,6 +203,7 @@ void mlx5vf_cmd_remove_migratable(struct mlx5vf_pci_core_device *mvdev)
&mvdev->nb);
destroy_workqueue(mvdev->cb_wq);
mutex_destroy(&mvdev->reset_mutex);
+ mutex_destroy(&mvdev->state_mutex);
}

void mlx5vf_cmd_set_migratable(struct mlx5vf_pci_core_device *mvdev,
--
2.17.1
\
 
 \ /
  Last update: 2023-11-22 20:33    [W:1.531 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site