• Nathan Lynch's avatar
    powerpc/pseries: Fix oops in hotplug memory notifier · 0aa82c48
    Nathan Lynch authored
    During post-migration device tree updates, we can oops in
    pseries_update_drconf_memory() if the source device tree has an
    ibm,dynamic-memory-v2 property and the destination has a
    ibm,dynamic_memory (v1) property. The notifier processes an "update"
    for the ibm,dynamic-memory property but it's really an add in this
    scenario. So make sure the old property object is there before
    dereferencing it.
    
    Fixes: 2b31e3ae ("powerpc/drmem: Add support for ibm, dynamic-memory-v2 property")
    Cc: stable@vger.kernel.org # v4.16+
    Signed-off-by: default avatarNathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    0aa82c48
hotplug-memory.c 22.6 KB