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] [day] [month] [year] [list]
Message-Id: <20260209-arm_coresight_refactor_dev_register-v4-8-62d6042f76f7@arm.com>
Date: Mon, 09 Feb 2026 12:44:40 +0000
From: Leo Yan <leo.yan@....com>
To: Suzuki K Poulose <suzuki.poulose@....com>, 
 Mike Leach <mike.leach@....com>, James Clark <james.clark@...aro.org>, 
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>, 
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
 Mathieu Poirier <mathieu.poirier@...aro.org>, 
 Mao Jinlong <quic_jinlmao@...cinc.com>
Cc: coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org, 
 linux-kernel@...r.kernel.org, Leo Yan <leo.yan@....com>
Subject: [PATCH v4 8/8] coresight: Unify bus unregistration via
 coresight_unregister()

Once a device is successfully registered, set the "registered" flag to
true.  After that point, all failures jump to the out_unlock label to
unwind the flow via coresight_unregister().

Since failure handling is unified, the comment about resource release
for the etm_perf_add_symlink_sink() failure is no need, remove it.

Signed-off-by: Leo Yan <leo.yan@....com>
---
 drivers/hwtracing/coresight/coresight-core.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
index 955af43010446803030973c72f07315492b2fcf3..56320ce49cb23bf7168f69b7f1ad820ca83b8365 100644
--- a/drivers/hwtracing/coresight/coresight-core.c
+++ b/drivers/hwtracing/coresight/coresight-core.c
@@ -1383,20 +1383,13 @@ struct coresight_device *coresight_register(struct coresight_desc *desc)
 		goto out_unlock;
 	}
 
-	ret = etm_perf_add_symlink_sink(csdev);
-
-	/*
-	 * As with the above, all resources are free'd explicitly via
-	 * coresight_device_release() triggered from put_device(), which is in
-	 * turn called from function device_unregister().
-	 */
-	if (ret && ret != -EOPNOTSUPP) {
-		device_unregister(&csdev->dev);
-		goto out_unlock;
-	}
 	/* Device is now registered */
 	registered = true;
 
+	ret = etm_perf_add_symlink_sink(csdev);
+	if (ret && ret != -EOPNOTSUPP)
+		goto out_unlock;
+
 	ret = coresight_create_conns_sysfs_group(csdev);
 	if (ret)
 		goto out_unlock;

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ