Re: [PATCH v2] powerpc: drmem: avoid NULL pointer dereference when drmem is unavailable

From: Nathan Lynch
Date: Wed Feb 05 2020 - 11:56:27 EST


Michal Suchanek <msuchanek@xxxxxxx> writes:
> From: Libor Pechacek <lpechacek@xxxxxxx>
>
> In guests without hotplugagble memory drmem structure is only zero
> initialized. Trying to manipulate DLPAR parameters results in a crash.
>

[...]

>
> Fixes: 6c6ea53725b3 ("powerpc/mm: Separate ibm, dynamic-memory data from DT format")
> Cc: Michal Suchanek <msuchanek@xxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Libor Pechacek <lpechacek@xxxxxxx>
> Signed-off-by: Michal Suchanek <msuchanek@xxxxxxx>
> ---
> v2: rename last_lmb -> limit, clarify error condition.

Acked-by: Nathan Lynch <nathanl@xxxxxxxxxxxxx>

Thanks!