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
| ||
|
Message-ID: <1679910560-23469-1-git-send-email-quic_taozha@quicinc.com> Date: Mon, 27 Mar 2023 17:49:20 +0800 From: Tao Zhang <quic_taozha@...cinc.com> To: Mathieu Poirier <mathieu.poirier@...aro.org>, Suzuki K Poulose <suzuki.poulose@....com>, Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Konrad Dybcio <konradybcio@...il.com>, Mike Leach <mike.leach@...aro.org>, Rob Herring <robh+dt@...nel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org> CC: Tao Zhang <quic_taozha@...cinc.com>, Jinlong Mao <quic_jinlmao@...cinc.com>, Leo Yan <leo.yan@...aro.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, <coresight@...ts.linaro.org>, <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>, Tingwei Zhang <quic_tingweiz@...cinc.com>, Yuanfang Zhang <quic_yuanfang@...cinc.com>, Trilok Soni <quic_tsoni@...cinc.com>, Hao Zhang <quic_hazha@...cinc.com>, <linux-arm-msm@...r.kernel.org>, <andersson@...nel.org> Subject: [PATCH] coresight: cti: Check if the CPU activated for the CPU CTI Check whether the CPU corresponding to the CPU CTI is activated. If it is not activated, the CPU CTI node should not exist, and an error will be returned in the initialization function. Signed-off-by: Tao Zhang <quic_taozha@...cinc.com> --- drivers/hwtracing/coresight/coresight-cti-core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-cti-core.c b/drivers/hwtracing/coresight/coresight-cti-core.c index 277c890..aaa83ae 100644 --- a/drivers/hwtracing/coresight/coresight-cti-core.c +++ b/drivers/hwtracing/coresight/coresight-cti-core.c @@ -899,10 +899,12 @@ static int cti_probe(struct amba_device *adev, const struct amba_id *id) drvdata->config.hw_powered = true; /* set up device name - will depend if cpu bound or otherwise */ - if (drvdata->ctidev.cpu >= 0) + if (drvdata->ctidev.cpu >= 0) { + if (!cpu_active(drvdata->ctidev.cpu)) + return -ENXIO; cti_desc.name = devm_kasprintf(dev, GFP_KERNEL, "cti_cpu%d", drvdata->ctidev.cpu); - else + } else cti_desc.name = coresight_alloc_device_name(&cti_sys_devs, dev); if (!cti_desc.name) return -ENOMEM; -- 2.7.4
Powered by blists - more mailing lists