| From e9a63377a00c083dc9ce5a0e50c7d3c5269c4cb0 Mon Sep 17 00:00:00 2001 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Sat, 14 Mar 2026 03:29:33 +0200 |
| Subject: interconnect: qcom: sm8450: Fix NULL pointer dereference in |
| icc_link_nodes() |
| |
| From: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> |
| |
| [ Upstream commit dbbd550d7c8d90d3af9fe8a12a9caff077ddb8e3 ] |
| |
| The change to dynamic IDs for SM8450 platform interconnects left two links |
| unconverted, fix it to avoid the NULL pointer dereference in runtime, |
| when a pointer to a destination interconnect is not valid: |
| |
| Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 |
| <...> |
| Call trace: |
| icc_link_nodes+0x3c/0x100 (P) |
| qcom_icc_rpmh_probe+0x1b4/0x528 |
| platform_probe+0x64/0xc0 |
| really_probe+0xc4/0x2a8 |
| __driver_probe_device+0x80/0x140 |
| driver_probe_device+0x48/0x170 |
| __device_attach_driver+0xc0/0x148 |
| bus_for_each_drv+0x88/0xf0 |
| __device_attach+0xb0/0x1c0 |
| device_initial_probe+0x58/0x68 |
| bus_probe_device+0x40/0xb8 |
| deferred_probe_work_func+0x90/0xd0 |
| process_one_work+0x15c/0x3c0 |
| worker_thread+0x2e8/0x400 |
| kthread+0x150/0x208 |
| ret_from_fork+0x10/0x20 |
| Code: 900310f4 911d6294 91008280 94176078 (f94002a0) |
| ---[ end trace 0000000000000000 ]--- |
| Kernel panic - not syncing: Oops: Fatal exception |
| |
| Fixes: 51513bec806f ("interconnect: qcom: sm8450: convert to dynamic IDs") |
| Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> |
| Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> |
| Link: https://msgid.link/20260314012933.350644-1-vladimir.zapolskiy@linaro.org |
| Signed-off-by: Georgi Djakov <djakov@kernel.org> |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| --- |
| drivers/interconnect/qcom/sm8450.c | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/drivers/interconnect/qcom/sm8450.c b/drivers/interconnect/qcom/sm8450.c |
| index 669a638bf3efc..c88327d200acc 100644 |
| --- a/drivers/interconnect/qcom/sm8450.c |
| +++ b/drivers/interconnect/qcom/sm8450.c |
| @@ -800,7 +800,7 @@ static struct qcom_icc_node qhs_compute_cfg = { |
| .channels = 1, |
| .buswidth = 4, |
| .num_links = 1, |
| - .link_nodes = { MASTER_CDSP_NOC_CFG }, |
| + .link_nodes = { &qhm_nsp_noc_config }, |
| }; |
| |
| static struct qcom_icc_node qhs_cpr_cx = { |
| @@ -874,7 +874,7 @@ static struct qcom_icc_node qhs_lpass_cfg = { |
| .channels = 1, |
| .buswidth = 4, |
| .num_links = 1, |
| - .link_nodes = { MASTER_CNOC_LPASS_AG_NOC }, |
| + .link_nodes = { &qhm_config_noc }, |
| }; |
| |
| static struct qcom_icc_node qhs_mss_cfg = { |
| -- |
| 2.53.0 |
| |