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: <20251104090825.224-1-vulab@iscas.ac.cn>
Date: Tue,  4 Nov 2025 17:08:25 +0800
From: Haotian Zhang <vulab@...as.ac.cn>
To: Vaibhav Hiremath <hvaibhav.linux@...il.com>,
	Johan Hovold <johan@...nel.org>,
	Alex Elder <elder@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: greybus-dev@...ts.linaro.org,
	linux-staging@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Haotian Zhang <vulab@...as.ac.cn>
Subject: [PATCH] staging: greybus: arche-platform: fix pm_notifier leak in probe error path

In arche_platform_probe(), if arche_platform_coldboot_seq() fails after
register_pm_notifier() succeeds, the function returns without unregistering
the pm_notifier, leading to a resource leak.

Add unregister_pm_notifier() call in the err_coldboot error path to
properly clean up the registered notifier on failure.

Fixes: d29b67d44a7c ("greybus: arche-platform: Add support for init-off feature")
Signed-off-by: Haotian Zhang <vulab@...as.ac.cn>
---
 drivers/staging/greybus/arche-platform.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index d48464390f58..9c5bb5dae187 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -545,6 +545,7 @@ static int arche_platform_probe(struct platform_device *pdev)
 	return 0;
 
 err_coldboot:
+	unregister_pm_notifier(&arche_pdata->pm_notifier);
 	mutex_unlock(&arche_pdata->platform_state_mutex);
 err_device_remove:
 	device_remove_file(&pdev->dev, &dev_attr_state);
-- 
2.50.1.windows.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ