]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
arm64: hugetlb: Fix huge_pte_offset to return poisoned page table entries
authorPunit Agrawal <punit.agrawal@arm.com>
Thu, 8 Jun 2017 17:25:26 +0000 (18:25 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 9 Aug 2017 14:23:29 +0000 (16:23 +0200)
commit0f3c2bcff3ac603e0d8c000a4e89c4c5fab18ca8
tree972a36aacb4e47d46902cf2b914dfb4ee5d344c0
parent5f21cd0297c67443d118fd7c2405df7c6549e5c8
arm64: hugetlb: Fix huge_pte_offset to return poisoned page table entries

When memory failure is enabled, a poisoned hugepage pte is marked as a
swap entry. huge_pte_offset() does not return the poisoned page table
entries when it encounters PUD/PMD hugepages.

This behaviour of huge_pte_offset() leads to error such as below when
munmap is called on poisoned hugepages.

[  344.165544] mm/pgtable-generic.c:33: bad pmd 000000083af00074.

Fix huge_pte_offset() to return the poisoned pte which is then
appropriately handled by the generic layer code.

BugLink: http://launchpad.net/bugs/1696852
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Woods <dwoods@mellanox.com>
Tested-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit f02ab08afbe76ee7b0b2a34a9970e7dd200d8b01)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/arm64/include/asm/pgtable.h
arch/arm64/mm/hugetlbpage.c