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: <20251210023243.47945-1-lihaoxiang@isrc.iscas.ac.cn>
Date: Wed, 10 Dec 2025 10:32:43 +0800
From: Haoxiang Li <lihaoxiang@...c.iscas.ac.cn>
To: andrew+netdev@...n.ch,
	davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	lihaoxiang@...c.iscas.ac.cn,
	izumi.taku@...fujitsu.com
Cc: netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: [PATCH] fjes: Add missing iounmap in fjes_hw_init()

In error paths, add fjes_hw_iounmap() to release the
resource acquired by fjes_hw_iomap().

Fixes: 8cdc3f6c5d22 ("fjes: Hardware initialization routine")
Cc: stable@...r.kernel.org
Signed-off-by: Haoxiang Li <lihaoxiang@...c.iscas.ac.cn>
---
 drivers/net/fjes/fjes_hw.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fjes/fjes_hw.c b/drivers/net/fjes/fjes_hw.c
index b9b5554ea862..a2e89ffa6f70 100644
--- a/drivers/net/fjes/fjes_hw.c
+++ b/drivers/net/fjes/fjes_hw.c
@@ -333,8 +333,10 @@ int fjes_hw_init(struct fjes_hw *hw)
 		return -EIO;
 
 	ret = fjes_hw_reset(hw);
-	if (ret)
+	if (ret) {
+		fjes_hw_iounmap(hw);
 		return ret;
+	}
 
 	fjes_hw_set_irqmask(hw, REG_ICTL_MASK_ALL, true);
 
@@ -347,8 +349,10 @@ int fjes_hw_init(struct fjes_hw *hw)
 	hw->max_epid = fjes_hw_get_max_epid(hw);
 	hw->my_epid = fjes_hw_get_my_epid(hw);
 
-	if ((hw->max_epid == 0) || (hw->my_epid >= hw->max_epid))
+	if ((hw->max_epid == 0) || (hw->my_epid >= hw->max_epid)) {
+		fjes_hw_iounmap(hw);
 		return -ENXIO;
+	}
 
 	ret = fjes_hw_setup(hw);
 
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ