Skip to content
Commit da5d2748 authored by Joerg Roedel's avatar Joerg Roedel
Browse files

iommu/mediatek: Use correct fwspec in mtk_iommu_add_device()



The mtk_iommu_add_device() function keeps the fwspec in an
on-stack pointer and calls mtk_iommu_create_mapping(), which
might change its source, dev->iommu_fwspec. This causes the
on-stack pointer to be obsoleted and the device
initialization to fail. Update the on-stack fwspec pointer
after mtk_iommu_create_mapping() has been called.

Reported-by: default avatarFrank Wunderlich <frank-w@public-files.de>
Fixes: a9bf2eec

 ('iommu/mediatek: Use helper functions to access dev->iommu_fwspec')
Tested-by: default avatarFrank Wunderlich <frank-w@public-files.de>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 198bc325
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