lkml.org 
[lkml]   [2016]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v14 10/22] vfio iommu type1: Add support for mediated devices
    From
    Date


    On 11/17/2016 5:27 AM, Alex Williamson wrote:
    > On Thu, 17 Nov 2016 02:16:22 +0530
    > Kirti Wankhede <kwankhede@nvidia.com> wrote:
    >> @@ -931,6 +1344,24 @@ static void vfio_iommu_type1_detach_group(void *iommu_data,
    >>
    >> mutex_lock(&iommu->lock);
    >>
    >> + if (iommu->external_domain) {
    >> + group = find_iommu_group(iommu->external_domain, iommu_group);
    >> + if (group) {
    >> + list_del(&group->next);
    >> + kfree(group);
    >> +
    >> + if (list_empty(&iommu->external_domain->group_list)) {
    >> + vfio_sanity_check_pfn_list(iommu);
    >> +
    >> + if (!IS_IOMMU_CAP_DOMAIN_IN_CONTAINER(iommu))
    >> + vfio_iommu_unmap_unpin_all(iommu);
    >> +
    >> + kfree(iommu->external_domain);
    >
    > I advised in one place that I didn't understand why we were checking
    > iommu->external_domain before walking the pfn_list, but we do have
    > several checks still in place for if(iommu->external_domain), so I
    > think we better be setting to NULL after we free it.
    >
    > I haven't finished my review yet, but if this ends up being the only
    > comment and you agree, I can add:
    >
    > iommu->external_domain = NULL;
    >
    > here on commit. Thanks,
    >

    Thanks Alex.

    I'm updating this patch and 11/22 as per your comment here and on 11/22.

    Thanks,
    Kirti

    \
     
     \ /
      Last update: 2016-11-17 05:49    [W:4.743 / U:0.124 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site