lkml.org 
[lkml]   [2018]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.17 056/220] powerpc/64s/radix: Fix radix_kvm_prefetch_workaround paca access of not possible CPU
    Date
    4.17-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Nicholas Piggin <npiggin@gmail.com>

    commit 758380b8155f69b4e2f77f27562f8a7a466749d6 upstream.

    If possible CPUs are limited (e.g., by kexec), then the kvm prefetch
    workaround function can access the paca pointer for a !possible CPU.

    Fixes: d2e60075a3d44 ("powerpc/64: Use array of paca pointers and allocate pacas individually")
    Cc: stable@kernel.org
    Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
    Tested-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
    Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    arch/powerpc/mm/tlb-radix.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/arch/powerpc/mm/tlb-radix.c
    +++ b/arch/powerpc/mm/tlb-radix.c
    @@ -733,6 +733,8 @@ extern void radix_kvm_prefetch_workaroun
    for (; sib <= cpu_last_thread_sibling(cpu) && !flush; sib++) {
    if (sib == cpu)
    continue;
    + if (!cpu_possible(sib))
    + continue;
    if (paca_ptrs[sib]->kvm_hstate.kvm_vcpu)
    flush = true;
    }

    \
     
     \ /
      Last update: 2018-07-01 18:39    [W:4.091 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site