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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <d71e0bcee781ebe12697df94083f16d651fb30c0.1732786634.git.xiaopei01@kylinos.cn>
Date: Thu, 28 Nov 2024 17:39:31 +0800
From: Pei Xiao <xiaopei01@...inos.cn>
To: hadar.gat@....com,
	olivia@...enic.com,
	linux-crypto@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Pei Xiao <xiaopei01@...inos.cn>
Subject: [PATCH] hwrng: cctrng: Add cancel_work_sync before module remove

Be ensured that the work is canceled before proceeding with
the cleanup in cc_trng_pm_fini.

Fixes: a583ed310bb6 ("hwrng: cctrng - introduce Arm CryptoCell driver")
Signed-off-by: Pei Xiao <xiaopei01@...inos.cn>
---
 drivers/char/hw_random/cctrng.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index 4db198849695..fd1ee3687782 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -127,6 +127,8 @@ static void cc_trng_pm_fini(struct cctrng_drvdata *drvdata)
 {
 	struct device *dev = &(drvdata->pdev->dev);
 
+	cancel_work_sync(&drvdata->compwork);
+	cancel_work_sync(&drvdata->startwork);
 	pm_runtime_disable(dev);
 }
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ