vfio/iommu_type1: Fix some sanity checks in detach group
stable inclusion from stable-5.10.20 commit c0e73c1d6d9186ab861e3d461a77836071cff990 bugzilla: 50608 -------------------------------- [ Upstream commit 4a19f37a ] vfio_sanity_check_pfn_list() is used to check whether pfn_list and notifier are empty when remove the external domain, so it makes a wrong assumption that only external domain will use the pinning interface. Now we apply the pfn_list check when a vfio_dma is removed and apply the notifier check when all domains are removed. Fixes: a54eb550 ("vfio iommu type1: Add support for mediated devices") Signed-off-by:Keqian Zhu <zhukeqian1@huawei.com> Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Chen Jun <chenjun102@huawei.com> Acked-by:
Xie XiuQi <xiexiuqi@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment