linux_dsm_epyc7002/arch/powerpc/mm/book3s64
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
..
hash_4k.c
hash_64k.c
hash_hugepage.c
hash_hugetlbpage.c
hash_native.c powerpc/book3s64/hash: Use secondary hash for bolted mapping if the primary is full 2019-10-28 21:54:16 +11:00
hash_pgtable.c powerpc/book3s64: Export has_transparent_hugepage() related functions. 2019-09-24 10:22:29 -07:00
hash_tlb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hash_utils.c powerpc/mm: book3s64: hash_utils: no need to check return value of debugfs_create functions 2020-03-04 22:44:25 +11:00
iommu_api.c powerpc/book3s64: Fix error handling in mm_iommu_do_alloc() 2020-03-04 22:44:27 +11:00
Makefile powerpc/pseries: Move mm/book3s64/vphn.c under platforms/pseries/ 2019-07-04 22:23:38 +10:00
mmu_context.c powerpc/book3s64/radix: Remove WARN_ON in destroy_context() 2019-09-21 08:36:53 +10:00
pgtable.c powerpc/mmu_gather: enable RCU_TABLE_FREE even for !SMP case 2020-02-04 03:05:25 +00:00
pkeys.c powerpc/pkeys: remove unused pkey_allows_readwrite 2019-10-11 19:34:10 +11:00
radix_hugetlbpage.c
radix_pgtable.c powerpc/mm: Remove kvm radix prefetch workaround for Power9 DD2.2 2020-01-26 00:11:37 +11:00
radix_tlb.c powerpc/mm: Remove kvm radix prefetch workaround for Power9 DD2.2 2020-01-26 00:11:37 +11:00
slb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
subpage_prot.c pagewalk: separate function pointers from iterator data 2019-09-07 04:28:04 -03:00