diff options
author | Aneesh Kumar K.V | 2016-01-11 16:49:34 +0100 |
---|---|---|
committer | Michael Ellerman | 2016-01-12 01:02:35 +0100 |
commit | 44734f23de2465c3c0d39e4a16df7735b23fd142 (patch) | |
tree | 9437405c5fff14e2820c0359367386686af80b69 /arch/powerpc/include/asm/book3s/64/hash.h | |
parent | cxl: Enable PCI device ID for future IBM CXL adapter (diff) | |
download | kernel-qcow2-linux-44734f23de2465c3c0d39e4a16df7735b23fd142.tar.gz kernel-qcow2-linux-44734f23de2465c3c0d39e4a16df7735b23fd142.tar.xz kernel-qcow2-linux-44734f23de2465c3c0d39e4a16df7735b23fd142.zip |
powerpc/mm: Fix _PAGE_PTE breaking swapoff
Core kernel expects swp_entry_t to consist of only swap type and swap
offset. We should not leak pte bits into swp_entry_t. This breaks
swapoff which use the swap type and offset to build a swp_entry_t and
later compare that to the swp_entry_t obtained from linux page table
pte. Leaking pte bits into swp_entry_t breaks that comparison and
results in us looping in try_to_unuse.
The stack trace can be anywhere below try_to_unuse() in mm/swapfile.c,
since swapoff is circling around and around that function, reading from
each used swap block into a page, then trying to find where that page
belongs, looking at every non-file pte of every mm that ever swapped.
Fixes: 6a119eae942c ("powerpc/mm: Add a _PAGE_PTE bit")
Reported-by: Hugh Dickins <hughd@google.com>
Suggested-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/book3s/64/hash.h')
0 files changed, 0 insertions, 0 deletions