]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
coresight: tpdm: fix invalid MMIO access issue
authorJie Gan <jie.gan@oss.qualcomm.com>
Tue, 7 Apr 2026 11:09:05 +0000 (19:09 +0800)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 7 Apr 2026 11:29:42 +0000 (12:29 +0100)
commit971f3474f8898ae8bbab19a9b547819a5e6fbcf1
tree65b257f75edb6d28df1a24d44f299e923c9c311e
parentec687ba84000d7d50cf243558041f6729d1d8119
coresight: tpdm: fix invalid MMIO access issue

Create the csdev_access struct only when a valid MMIO resource is
available. In tpdm_probe(), base is uninitialized for static TPDM
instances that lack an MMIO resource, causing csdev_access to be
created with a garbage address.

So far there has no register access for static instance, but this
change helps mitigate potential risks in the future.

Fixes: 14ae052f7947 ("coresight: tpdm: add static tpdm support")
Reviewed-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20260407-fix-potential-issue-in-tpdm-v2-1-1d0e0d3cb793@oss.qualcomm.com
drivers/hwtracing/coresight/coresight-tpdm.c