• Nathan Fontenot's avatar
    powerpc/pseries: Verify CPU doesn't exist before adding · 1f859adb
    Nathan Fontenot authored
    When DLPAR adding a CPU we should verify that the CPU does not already
    exist. Failure to do so can generate a kernel oops;
    
    [    9.465585] kernel BUG at arch/powerpc/platforms/pseries/dlpar.c:382!
    [    9.465796] Oops: Exception in kernel mode, sig: 5 [#1]
    
    This oops can be generated by causing a probe to be performed on a cpu
    by writing to the sysfs cpu probe file (/sys/devices/system/cpu/probe).
    This patch adds a check for the existence of cpu prior to probing the cpu
    so userspace doing the wrong thing won't trigger a BUG_ON().
    Signed-off-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    1f859adb
dlpar.c 13.7 KB