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: <20241101101032.1446992-1-peng.fan@oss.nxp.com>
Date: Fri,  1 Nov 2024 18:10:32 +0800
From: "Peng Fan (OSS)" <peng.fan@....nxp.com>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>,
	Jacky Bai <ping.bai@....com>,
	Peng Fan <peng.fan@....com>,
	linux-rtc@...r.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM),
	linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] rtc: bbnsm: add remove hook

From: Peng Fan <peng.fan@....com>

Without remove hook to clear wake irq, there will be kernel dump when
doing module test.
"bbnsm_rtc 44440000.bbnsm:rtc: wake irq already initialized"

Add remove hook to clear wake irq and set wakeup to false.

Fixes: eb7b85853c38 ("rtc: bbnsm: Add the bbnsm rtc support")
Signed-off-by: Peng Fan <peng.fan@....com>
---
 drivers/rtc/rtc-nxp-bbnsm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/rtc/rtc-nxp-bbnsm.c b/drivers/rtc/rtc-nxp-bbnsm.c
index acbfbeb8b070..fa88fd8ffadf 100644
--- a/drivers/rtc/rtc-nxp-bbnsm.c
+++ b/drivers/rtc/rtc-nxp-bbnsm.c
@@ -206,6 +206,12 @@ static int bbnsm_rtc_probe(struct platform_device *pdev)
 	return devm_rtc_register_device(bbnsm->rtc);
 }
 
+static void bbnsm_rtc_remove(struct platform_device *pdev)
+{
+	dev_pm_clear_wake_irq(&pdev->dev);
+	device_init_wakeup(&pdev->dev, false);
+}
+
 static const struct of_device_id bbnsm_dt_ids[] = {
 	{ .compatible = "nxp,imx93-bbnsm-rtc" },
 	{ /* sentinel */ },
@@ -218,6 +224,7 @@ static struct platform_driver bbnsm_rtc_driver = {
 		.of_match_table = bbnsm_dt_ids,
 	},
 	.probe = bbnsm_rtc_probe,
+	.remove_new = bbnsm_rtc_remove,
 };
 module_platform_driver(bbnsm_rtc_driver);
 
-- 
2.37.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ