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]
Message-ID: <20241224060819.1492472-2-koichiro.den@canonical.com>
Date: Tue, 24 Dec 2024 15:08:16 +0900
From: Koichiro Den <koichiro.den@...onical.com>
To: linux-gpio@...r.kernel.org
Cc: linus.walleij@...aro.org,
	brgl@...ev.pl,
	linux-kernel@...r.kernel.org
Subject: [PATCH 1/4] gpio: virtuser: fix missing lookup table cleanup on probe failure

When a virtuser device is created via configfs and the probe fails due
to an incorrect lookup table, the table is not removed. This prevents
subsequent probe attempts from succeeding, even if the issue is
corrected, unless the device is released.

Ensure the lookup table is removed whenever the probe fails.

Fixes: 91581c4b3f29 ("gpio: virtuser: new virtual testing driver for the GPIO API")
Signed-off-by: Koichiro Den <koichiro.den@...onical.com>
---
 drivers/gpio/gpio-virtuser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-virtuser.c b/drivers/gpio/gpio-virtuser.c
index 91b6352c957c..a81e15a4b807 100644
--- a/drivers/gpio/gpio-virtuser.c
+++ b/drivers/gpio/gpio-virtuser.c
@@ -1509,6 +1509,7 @@ gpio_virtuser_device_activate(struct gpio_virtuser_device *dev)
 	if (!dev->driver_bound) {
 		platform_device_unregister(pdev);
 		fwnode_remove_software_node(swnode);
+		gpiod_remove_lookup_table(dev->lookup_table);
 		return -ENXIO;
 	}
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ