Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg...
[sfrench/cifs-2.6.git] / drivers / iommu / iommufd / hw_pagetable.c
index 4e8711f19f721565964fbbbee82bc87278d33858..3f3f1fa1a0a946a43eb48ee324ab4979683bb566 100644 (file)
@@ -135,6 +135,7 @@ iommufd_hwpt_paging_alloc(struct iommufd_ctx *ictx, struct iommufd_ioas *ioas,
                        hwpt->domain = NULL;
                        goto out_abort;
                }
+               hwpt->domain->owner = ops;
        } else {
                hwpt->domain = iommu_domain_alloc(idev->dev->bus);
                if (!hwpt->domain) {
@@ -233,6 +234,7 @@ iommufd_hwpt_nested_alloc(struct iommufd_ctx *ictx,
                hwpt->domain = NULL;
                goto out_abort;
        }
+       hwpt->domain->owner = ops;
 
        if (WARN_ON_ONCE(hwpt->domain->type != IOMMU_DOMAIN_NESTED)) {
                rc = -EINVAL;