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-next>] [day] [month] [year] [list]
Message-ID: <20220922024601.3643622-1-ruanjinjie@huawei.com>
Date:   Thu, 22 Sep 2022 10:46:01 +0800
From:   ruanjinjie <ruanjinjie@...wei.com>
To:     <dennis.dalessandro@...nelisnetworks.com>, <jgg@...pe.ca>,
        <leon@...nel.org>, <linux-rdma@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
CC:     <ruanjinjie@...wei.com>
Subject: [PATCH -next] IB/hfi1,PCI: Fix missing pci_disable_device() in probe and remove

Replace pci_enable_device() with pcim_enable_device(),
pci_disable_device() and pci_release_regions() will be
called in release automatically.

Signed-off-by: ruanjinjie <ruanjinjie@...wei.com>
---
 drivers/infiniband/hw/hfi1/pcie.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/pcie.c b/drivers/infiniband/hw/hfi1/pcie.c
index a0802332c8cb..45a0fb75f2d8 100644
--- a/drivers/infiniband/hw/hfi1/pcie.c
+++ b/drivers/infiniband/hw/hfi1/pcie.c
@@ -26,7 +26,7 @@ int hfi1_pcie_init(struct hfi1_devdata *dd)
 	int ret;
 	struct pci_dev *pdev = dd->pcidev;
 
-	ret = pci_enable_device(pdev);
+	ret = pcim_enable_device(pdev);
 	if (ret) {
 		/*
 		 * This can happen (in theory) iff:
@@ -78,12 +78,10 @@ int hfi1_pcie_init(struct hfi1_devdata *dd)
  */
 void hfi1_pcie_cleanup(struct pci_dev *pdev)
 {
-	pci_disable_device(pdev);
 	/*
 	 * Release regions should be called after the disable. OK to
 	 * call if request regions has not been called or failed.
 	 */
-	pci_release_regions(pdev);
 }
 
 /*
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ