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: <20250307140922.5776-1-ilpo.jarvinen@linux.intel.com>
Date: Fri,  7 Mar 2025 16:09:22 +0200
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Krzysztof Wilczyński <kw@...ux.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Subject: [PATCH 1/1] PCI: Do not claim to release resource falsely

pci_release_resource() will print "... releasing" regardless of the
resource being assigned or not. Move the print after the res->parent
check to avoid claiming the kernel would be releasing an unassigned
resource.

Likely, none of the current callers pass a resource that is unassigned so
this change is mostly to correct the non-sensical order than to remove
errorneous printouts.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
---
 drivers/pci/setup-res.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index ca14576bf2bf..21719ae29a34 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -414,11 +414,11 @@ void pci_release_resource(struct pci_dev *dev, int resno)
 	struct resource *res = dev->resource + resno;
 	const char *res_name = pci_resource_name(dev, resno);
 
-	pci_info(dev, "%s %pR: releasing\n", res_name, res);
-
 	if (!res->parent)
 		return;
 
+	pci_info(dev, "%s %pR: releasing\n", res_name, res);
+
 	release_resource(res);
 	res->end = resource_size(res) - 1;
 	res->start = 0;

base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
prerequisite-patch-id: e4a2c15d0cd3241e2fdb1af98510211e63ec3d06
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ