lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5A97E082.3020109@rock-chips.com>
Date:   Thu, 01 Mar 2018 19:14:10 +0800
From:   JeffyChen <jeffy.chen@...k-chips.com>
To:     Robin Murphy <robin.murphy@....com>, linux-kernel@...r.kernel.org
CC:     jcliang@...omium.org, xxm@...k-chips.com, tfiga@...omium.org,
        Heiko Stuebner <heiko@...ech.de>,
        linux-rockchip@...ts.infradead.org,
        iommu@...ts.linux-foundation.org, Joerg Roedel <joro@...tes.org>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [RESEND PATCH v6 14/14] iommu/rockchip: Support sharing IOMMU
 between masters

Hi Robin,

On 03/01/2018 07:03 PM, Robin Murphy wrote:
>>
>> +static struct iommu_group *rk_iommu_device_group(struct device *dev)
>> +{
>> +    struct rk_iommu *iommu;
>> +
>> +    iommu = rk_iommu_from_dev(dev);
>> +
>> +    return iommu->group;
>
> Oops, seems I overlooked this in my previous review - it should really be:
>
>      return iommu_group_get(iommu->group);
>
> or the refcounting will be unbalanced on those future systems where it
> really will be called more than once.
>
hmmm, right, it should be return iommu_group_ref_get(iommu->group);

i was following omap iommu:
static struct iommu_group *omap_iommu_device_group(struct device *dev)
{
         struct omap_iommu_arch_data *arch_data = dev->archdata.iommu;
         struct iommu_group *group = ERR_PTR(-EINVAL);

         if (arch_data->iommu_dev)
                 group = arch_data->iommu_dev->group;

         return group;
}

will fix it too in the version.

> Robin.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ