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>] [day] [month] [year] [list]
Message-ID: <20251110224459.49724-1-shofiqtest@gmail.com>
Date: Tue, 11 Nov 2025 00:44:47 +0200
From: Md Shofiqul Islam <shofiqtest@...il.com>
To: nm@...com
Cc: ssantosh@...nel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	Md Shofiqul Islam <shofiqtest@...il.com>
Subject: [PATCH v2] soc: ti: knav_qmss_queue: free resources in remove callback (v2)


Hi Nishanth,

Thanks for reviewing!

This is version 2 (v2) of the patch, not the same as before.
I have fixed the formatting and indentation issues you pointed out.
The patch now passes checkpatch.pl without any warnings or errors.

Changes in v2:
- Fixed indentation and alignment issues reported by checkpatch
- Wrapped commit message lines to within 75 characters

Thanks again for your feedback!

Regards,
Md Shofiqul Islam

Implement the TODO in knav_queue_remove() by stopping PDSPs and
freeing queue regions and queue ranges before disabling runtime PM,
mirroring the allocations performed in the probe path.

This ensures resources are released on driver unbind and avoids
leaking queue/region state.

Signed-off-by: Md Shofiqul Islam <shofiqtest@...il.com>
---
 drivers/soc/ti/knav_qmss_queue.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index 1e5f3e9faa99..7d9f3570ecf3 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/*
+/**
  * Keystone Queue Manager subsystem driver
  *
  * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
- * Authors:	Sandeep Nair <sandeep_n@...com>
- *		Cyril Chemparathy <cyril@...com>
- *		Santosh Shilimkar <santosh.shilimkar@...com>
+ * Authors: Sandeep Nair <sandeep_n@...com>
+ *          Cyril Chemparathy <cyril@...com>
+ *          Santosh Shilimkar <santosh.shilimkar@...com>
  */
 
 #include <linux/debugfs.h>
@@ -1884,14 +1884,13 @@ static int knav_queue_probe(struct platform_device *pdev)
 
 static void knav_queue_remove(struct platform_device *pdev)
 {
-    struct knav_device *kdev = platform_get_drvdata(pdev);
-
-    knav_queue_stop_pdsps(kdev);
-    knav_queue_free_regions(kdev);
-    knav_free_queue_ranges(kdev);
+	struct knav_device *kdev = platform_get_drvdata(pdev);
 
-    pm_runtime_put_sync(&pdev->dev);
-    pm_runtime_disable(&pdev->dev);
+	knav_queue_stop_pdsps(kdev);
+	knav_queue_free_regions(kdev);
+	knav_free_queue_ranges(kdev);
+	pm_runtime_put_sync(&pdev->dev);
+	pm_runtime_disable(&pdev->dev);
 }
 
 static struct platform_driver keystone_qmss_driver = {
-- 
2.51.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ