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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251211123635.2215-1-guojinhui.liam@bytedance.com>
Date: Thu, 11 Dec 2025 20:36:35 +0800
From: "Jinhui Guo" <guojinhui.liam@...edance.com>
To: <bhelgaas@...gle.com>, <kbusch@...nel.org>, <dave.jiang@...el.com>, 
	<dan.j.williams@...el.com>
Cc: <guojinhui.liam@...edance.com>, <linux-pci@...r.kernel.org>, 
	<linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>
Subject: [PATCH] PCI: Remove redundant pci_dev_unlock() in pci_slot_trylock()

Commit a4e772898f8b ("PCI: Add missing bridge lock to pci_bus_lock()")
delegates the bridge device's pci_dev_trylock() to pci_bus_trylock()
in pci_slot_trylock(), but it leaves a redundant pci_dev_unlock() when
pci_bus_trylock() fails.

Remove the redundant bridge-device pci_dev_unlock() in pci_slot_trylock(),
since that lock is no longer taken there.

Fixes: a4e772898f8b ("PCI: Add missing bridge lock to pci_bus_lock()")
Cc: stable@...r.kernel.org
Signed-off-by: Jinhui Guo <guojinhui.liam@...edance.com>
---
 drivers/pci/pci.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 13dbb405dc31..75a98819db6f 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -5347,7 +5347,6 @@ static int pci_slot_trylock(struct pci_slot *slot)
 			continue;
 		if (dev->subordinate) {
 			if (!pci_bus_trylock(dev->subordinate)) {
-				pci_dev_unlock(dev);
 				goto unlock;
 			}
 		} else if (!pci_dev_trylock(dev))
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ