Skip to content
Commit b62841e4 authored by Artem Chernyshev's avatar Artem Chernyshev Committed by Greg Kroah-Hartman
Browse files

iommu: sprd: Avoid NULL deref in sprd_iommu_hw_en



[ Upstream commit 630482ee0653decf9e2482ac6181897eb6cde5b8 ]

In sprd_iommu_cleanup() before calling function sprd_iommu_hw_en()
dom->sdev is equal to NULL, which leads to null dereference.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 9afea573 ("iommu/sprd: Release dma buffer to avoid memory leak")
Signed-off-by: default avatarArtem Chernyshev <artem.chernyshev@red-soft.ru>
Reviewed-by: default avatarChunyan Zhang <zhang.lyra@gmail.com>
Link: https://lore.kernel.org/r/20240716125522.3690358-1-artem.chernyshev@red-soft.ru


Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 97dfb894
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment