diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2019-12-23 17:03:51 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-03-04 22:44:27 +1100 |
commit | c4b78169e3667413184c9a20e11b5832288a109f (patch) | |
tree | 71c574f533e152ae83d7b0bd06729cea889d5eca /arch/powerpc/include/asm | |
parent | f344f0ab993987ae29cb39cc52054d7346db082f (diff) |
powerpc/book3s64: Fix error handling in mm_iommu_do_alloc()
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@suse.cz>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191223060351.26359-1-aik@ozlabs.ru
Diffstat (limited to 'arch/powerpc/include/asm')
0 files changed, 0 insertions, 0 deletions