lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 22 Nov 2023 11:32:03 -0800
From:   Brett Creeley <brett.creeley@....com>
To:     <jgg@...pe.ca>, <yishaih@...dia.com>,
        <shameerali.kolothum.thodi@...wei.com>, <kevin.tian@...el.com>,
        <alex.williamson@...hat.com>, <kvm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
CC:     <shannon.nelson@....com>, <brett.creeley@....com>
Subject: [PATCH vfio 2/2] vfio/mlx5: Destroy the state_mutex on release

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@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ