Re: [PATCH v2] vfio: fix noiommu vfio_iommu_group_get reference count

2017-08-30 Thread Alex Williamson
On Fri, 11 Aug 2017 15:16:06 +0200 Eric Auger wrote: > In vfio_iommu_group_get() we want to increase the reference > count of the iommu group. > > In noiommu case, the group does not exist and is allocated. > iommu_group_add_device() increases the group ref count. However we > then call iommu_gr

[PATCH v2] vfio: fix noiommu vfio_iommu_group_get reference count

2017-08-11 Thread Eric Auger
In vfio_iommu_group_get() we want to increase the reference count of the iommu group. In noiommu case, the group does not exist and is allocated. iommu_group_add_device() increases the group ref count. However we then call iommu_group_put() which decrements it. This leads to a "refcount_t: underf