[Crash-utility] [PATCH] Fix for "kmem -z" on Linux 5.0

Dave Anderson anderson at redhat.com
Thu Mar 7 21:21:53 UTC 2019



Thanks Kazu -- queued for crash-7.2.6:
  
 https://github.com/crash-utility/crash/commit/84f5e2a19e89236aa559f3b0d5024f3001c75a06

Dave

----- Original Message -----
> Fix for the "kmem -z" command on Linux 5.0 and later kernels that
> contain commit a921444382b49cc7fdeca3fba3e278bc09484a27, titled
> "mm: move zone watermark accesses behind an accessor". Without the
> patch, the command fails with the following error message.
> 
> kmem: invalid (optional) structure member offsets: zone_pages_min or
> zone_struct_pages_min
>       FILE: memory.c  LINE: 16457  FUNCTION: dump_zone_stats()
> 
> Signed-off-by: Kazuhito Hagio <k-hagio at ab.jp.nec.com>
> ---
>  memory.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/memory.c b/memory.c
> index 8cdab06..9c1019a 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -1095,6 +1095,9 @@ vm_init(void)
>                                  "zone", "pages_high");
>                          MEMBER_OFFSET_INIT(zone_watermark,
>                                  "zone", "watermark");
> +                        if (INVALID_MEMBER(zone_watermark))
> +                                MEMBER_OFFSET_INIT(zone_watermark,
> +                                        "zone", "_watermark");
>                          MEMBER_OFFSET_INIT(zone_nr_active,
>                                  "zone", "nr_active");
>                          MEMBER_OFFSET_INIT(zone_nr_inactive,
> --
> 1.8.3.1
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
> 




More information about the Crash-utility mailing list