In the current code, symbol information related to zram is initialized even when a given disk is not zram. It should be done after the disk turns out to be zram. Signed-off-by: HATAYAMA Daisuke <d.hatayama@xxxxxxxxxxx> --- diskdump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/diskdump.c b/diskdump.c index dcc7142..047d8ad 100644 --- a/diskdump.c +++ b/diskdump.c @@ -2719,9 +2719,6 @@ try_zram_decompress(ulonglong pte_val, unsigned char *buf, ulong len, ulonglong unsigned char *zram_buf = NULL; unsigned char *outbuf = NULL; - if (INVALID_MEMBER(zram_compressor)) - zram_init(); - off = PAGEOFFSET(vaddr); if (!symbol_exists("swap_info")) return 0; @@ -2752,6 +2749,9 @@ try_zram_decompress(ulonglong pte_val, unsigned char *buf, ulong len, ulonglong return 0; } + if (INVALID_MEMBER(zram_compressor)) + zram_init(); + if (CRASHDEBUG(2)) error(WARNING, "this page has swapped to zram\n"); -- 1.8.3.1 -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility