On Mon, 2019-12-23 at 06:03:51 UTC, Alexey Kardashevskiy wrote: > The last jump to free_exit in mm_iommu_do_alloc() happens after page > pointers in struct mm_iommu_table_group_mem_t were already converted to > physical addresses. Thus calling put_page() on these physical addresses > will likely crash. > > This moves the loop which calculates the pageshift and converts page > struct pointers to physical addresses later after the point when > we cannot fail; thus eliminating the need to convert pointers back. > > Fixes: eb9d7a62c386 ("powerpc/mm_iommu: Fix potential deadlock") > Reported-by: Jan Kara <jack@xxxxxxx> > Signed-off-by: Alexey Kardashevskiy <aik@xxxxxxxxx> Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/c4b78169e3667413184c9a20e11b5832288a109f cheers