From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Ellerman Date: Sun, 23 Dec 2018 13:28:17 +0000 Subject: Re: [RFC,kernel] vfio/spapr_tce: Get rid of possible infinite loop Message-Id: <43N38f2dkcz9sPG@ozlabs.org> List-Id: In-Reply-To: <20181002032231.7494-1-aik@ozlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexey Kardashevskiy , linuxppc-dev@lists.ozlabs.org Cc: Alexey Kardashevskiy , Alex Williamson , kvm-ppc@vger.kernel.org, David Gibson On Tue, 2018-10-02 at 03:22:31 UTC, 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 failure to make > the code more bug prone. > > Signed-off-by: Alexey Kardashevskiy > Reviewed-by: David Gibson > Acked-by: Alex Williamson Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/517ad4ae8aa93dccdb9a88c27257ec cheers