[PATCH kernel v3] powerpc/book3s64: Fix error handling in mm_iommu_do_alloc()

Michael Ellerman patch-notifications at ellerman.id.au
Fri Mar 6 11:27:32 AEDT 2020


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 at suse.cz>
> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/c4b78169e3667413184c9a20e11b5832288a109f

cheers


More information about the Linuxppc-dev mailing list