summaryrefslogtreecommitdiff
path: root/Kbuild
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-11-10 04:27:36 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2017-11-13 23:34:19 +1100
commit6a72dc038b615229a1b285829d6c8378d15c2347 (patch)
tree3258a738aae36b3dc5aab119ead8e11706191751 /Kbuild
parent7ece370996b694ae263025e056ad785afc1be5ab (diff)
powerpc/64s/hash: Fix 128TB-512TB virtual address boundary case allocation
When allocating VA space with a hint that crosses 128TB, the SLB addr_limit variable is not expanded if addr is not > 128TB, but the slice allocation looks at task_size, which is 512TB. This results in slice_check_fit() incorrectly succeeding because the slice_count truncates off bit 128 of the requested mask, so the comparison to the available mask succeeds. Fix this by using mm->context.addr_limit instead of mm->task_size for testing allocation limits. This causes such allocations to fail. Fixes: f4ea6dcb08ea ("powerpc/mm: Enable mappings above 128TB") Cc: stable@vger.kernel.org # v4.12+ Reported-by: Florian Weimer <fweimer@redhat.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions