linux_dsm_epyc7002/arch/powerpc/mm
Alexey Kardashevskiy c4b78169e3 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: eb9d7a62c3 ("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
2020-03-04 22:44:27 +11:00
..
book3s32 powerpc/32: refactor pmd_offset(pud_offset(pgd_offset... 2020-02-26 10:34:40 +11:00
book3s64 powerpc/book3s64: Fix error handling in mm_iommu_do_alloc() 2020-03-04 22:44:27 +11:00
kasan powerpc/32: refactor pmd_offset(pud_offset(pgd_offset... 2020-02-26 10:34:40 +11:00
nohash powerpc/32: refactor pmd_offset(pud_offset(pgd_offset... 2020-02-26 10:34:40 +11:00
ptdump powerpc/mm: ptdump: no need to check return value of debugfs_create functions 2020-03-04 22:44:25 +11:00
copro_fault.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 153 2019-05-30 11:26:32 -07:00
dma-noncoherent.c dma-mapping: drop the dev argument to arch_sync_dma_for_* 2019-11-20 20:31:38 +01:00
drmem.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fault.c Merge branch 'topic/user-access-begin' into next 2020-02-01 21:47:17 +11:00
highmem.c powerpc/highmem: Change BUG_ON() to WARN_ON() 2019-04-20 22:02:11 +10:00
hugetlbpage.c mm: introduce compound_nr() 2019-09-24 15:54:08 -07:00
init_32.c powerpc: move memstart_addr and kernstart_addr to init-common.c 2019-11-13 19:27:28 +11:00
init_64.c Merge branch 'topic/kaslr-book3e32' into next 2019-11-14 19:23:33 +11:00
init-common.c powerpc: introduce kernstart_virt_addr to store the kernel base 2019-11-13 19:27:32 +11:00
ioremap_32.c powerpc/ioremap: warn on early use of ioremap() 2019-11-19 19:38:38 +11:00
ioremap_64.c powerpc/ioremap: warn on early use of ioremap() 2019-11-19 19:38:38 +11:00
ioremap.c powerpc/mm: split out early ioremap path. 2019-08-27 13:03:35 +10:00
Makefile powerpc/mm: Move ioremap functions out of pgtable_32/64.c 2019-08-27 13:03:35 +10:00
mem.c powerpc/32: drop get_pteptr() 2020-02-26 10:34:41 +11:00
mmap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
mmu_context.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mmu_decl.h powerpc/ptdump: don't entirely rebuild kernel when selecting CONFIG_PPC_DEBUG_WX 2020-01-23 21:31:11 +11:00
numa.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
pgtable_32.c powerpc/32: drop get_pteptr() 2020-02-26 10:34:41 +11:00
pgtable_64.c powerpc/mm: Move ioremap functions out of pgtable_32/64.c 2019-08-27 13:03:35 +10:00
pgtable-frag.c mm: treewide: clarify pgtable_page_{ctor,dtor}() naming 2019-09-26 10:10:44 -07:00
pgtable.c powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
slice.c powerpc/mm: Mark get_slice_psize() & slice_addr_is_low() as notrace 2019-12-23 21:12:51 +11:00