]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Fix oops in hotplug memory notifier
authorNathan Lynch <nathanl@linux.ibm.com>
Fri, 7 Jun 2019 05:04:07 +0000 (00:04 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 14 Jun 2019 05:36:33 +0000 (15:36 +1000)
commit48eb18c153406d9d88c339cd0f6550508d7a3661
treeab2a3c9ec73a676ff0d3a2bbdbff38bc0727ea68
parent339d3821bfbc35bb7ae8b524cbb1369367934728
powerpc/pseries: Fix oops in hotplug memory notifier

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: 7dc3e5e62b42 ("powerpc/drmem: Add support for ibm, dynamic-memory-v2 property")
Cc: stable@vger.kernel.org # v4.16+
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/hotplug-memory.c