Re: [RFC PATCH kernel] vfio/spapr_tce: Get rid of possible infinite loop

2018-12-18 Thread Alexey Kardashevskiy
On 08/10/2018 21:18, Michael Ellerman wrote: > Serhii Popovych writes: >> Alexey Kardashevskiy wrote: >>> As a part of cleanup, the SPAPR TCE IOMMU subdriver releases preregistered >>> memory. If there is a bug in memory release, the loop in >>> tce_iommu_release() becomes infinite; this actual

Re: [RFC PATCH kernel] vfio/spapr_tce: Get rid of possible infinite loop

2018-10-08 Thread Michael Ellerman
Serhii Popovych writes: > Alexey Kardashevskiy wrote: >> As a part of cleanup, the SPAPR TCE IOMMU subdriver releases preregistered >> memory. If there is a bug in memory release, the loop in >> tce_iommu_release() becomes infinite; this actually happened to me. >> >> This makes the loop finite a

Re: [RFC PATCH kernel] vfio/spapr_tce: Get rid of possible infinite loop

2018-10-08 Thread Serhii Popovych
Alexey Kardashevskiy wrote: > As a part of cleanup, the SPAPR TCE IOMMU subdriver releases preregistered > memory. If there is a bug in memory release, the loop in > tce_iommu_release() becomes infinite; this actually happened to me. > > This makes the loop finite and prints a warning on every fai

Re: [RFC PATCH kernel] vfio/spapr_tce: Get rid of possible infinite loop

2018-10-03 Thread Alex Williamson
On Tue, 2 Oct 2018 13:22:31 +1000 Alexey Kardashevskiy wrote: > As a part of cleanup, the SPAPR TCE IOMMU subdriver releases preregistered > memory. If there is a bug in memory release, the loop in > tce_iommu_release() becomes infinite; this actually happened to me. > > This makes the loop fin

Re: [RFC PATCH kernel] vfio/spapr_tce: Get rid of possible infinite loop

2018-10-01 Thread David Gibson
On Tue, Oct 02, 2018 at 01:22:31PM +1000, Alexey Kardashevskiy wrote: > As a part of cleanup, the SPAPR TCE IOMMU subdriver releases preregistered > memory. If there is a bug in memory release, the loop in > tce_iommu_release() becomes infinite; this actually happened to me. > > This makes the loo

[RFC PATCH kernel] vfio/spapr_tce: Get rid of possible infinite loop

2018-10-01 Thread Alexey Kardashevskiy
As a part of cleanup, the SPAPR TCE IOMMU subdriver releases preregistered memory. If there is a bug in memory release, the loop in tce_iommu_release() becomes infinite; this actually happened to me. This makes the loop finite and prints a warning on every failure to make the code more bug prone.