[PATCH] iommu/qcom: Disable clocks if restoring the secure config fails
Konrad Dybcio
konrad.dybcio at oss.qualcomm.com
Mon Nov 23 07:26:32 PST 2026
On 11/22/26 11:11 AM, Suyuan Wang via B4 Relay wrote:
> From: Suyuan Wang <stevewong at hust.edu.cn>
>
> qcom_iommu_resume() enables the clocks and then, for an IOMMU with a
> power domain, calls qcom_scm_restore_sec_cfg(). If that call fails, the
> error is returned but the clocks stay enabled. The PM core then treats
> the device as still suspended, so qcom_iommu_suspend() will not run to
> turn them off.
>
> Disable the clocks again when qcom_scm_restore_sec_cfg() fails.
>
> Found with a static analysis tool and checked by hand.
>
> Fixes: 268dd4edb748 ("iommu/qcom: restore IOMMU state if needed")
> Cc: stable at vger.kernel.org
> Co-developed-by: Kaixuan Li <kaixuan.li at ntu.edu.sg>
> Signed-off-by: Kaixuan Li <kaixuan.li at ntu.edu.sg>
> Signed-off-by: Suyuan Wang <stevewong at hust.edu.cn>
> ---
> Compile tested on arm64 (W=1). I don't have the hardware.
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio at oss.qualcomm.com>
Konrad
More information about the linux-arm-kernel
mailing list