]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
interconnect: qcom: sm8450: Fix NULL pointer dereference in icc_link_nodes()
authorVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Sat, 14 Mar 2026 01:29:33 +0000 (03:29 +0200)
committerGeorgi Djakov <djakov@kernel.org>
Sat, 14 Mar 2026 10:53:13 +0000 (12:53 +0200)
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>
drivers/interconnect/qcom/sm8450.c

index 669a638bf3efcd9ed594d63f25c9022314fa1d54..c88327d200acc840b486d6c14b95ea6fa0fa9e97 100644 (file)
@@ -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 = {