-
由 Joerg Roedel 提交于
mainline inclusion from mainline-v5.0-rc1 commit da5d2748 category:bugfix bugzilla:NA CVE:NA ------------------- 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: NFrank Wunderlich <frank-w@public-files.de> Fixes: a9bf2eec ('iommu/mediatek: Use helper functions to access dev->iommu_fwspec') Tested-by: NFrank Wunderlich <frank-w@public-files.de> Signed-off-by: NJoerg Roedel <jroedel@suse.de> Signed-off-by: NChen Jun <chenjun102@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
287958ca