drivers/iommu: Allow IOMMU bus ops to be unregistered
mainline inclusion from mainline-v5.6-rc1 commit 4312cf7f category: bugfix bugzilla: 30226, https://gitee.com/openeuler/kernel/issues/I6H9U5 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4312cf7f16c8d43e154bf2a6eea6d1e9347c922c -------------------------------- 'bus_set_iommu()' allows IOMMU drivers to register their ops for a given bus type. Unfortunately, it then doesn't allow them to be removed, which is necessary for modular drivers to shutdown cleanly so that they can be reloaded later on. Allow 'bus_set_iommu()' to take a NULL 'ops' argument, which clear the ops pointer for the selected bus_type. Signed-off-by:Will Deacon <will@kernel.org> Tested-by: John Garry <john.garry@huawei.com> # smmu v3 Reviewed-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Joerg Roedel <jroedel@suse.de> Signed-off-by:
Guo Mengqi <guomengqi3@huawei.com> Reviewed-by:
Weilong Chen <chenweilong@huawei.com> Signed-off-by:
Yongqiang Liu <liuyongqiang13@huawei.com>
Loading
Please sign in to comment