if kernel dump for Linux 4.6 is loaded there is warning message
"crash: failed to read pageflag_names entry".

Since Linux commit edf14cdbf9a0e5ab52698ca66d07a76ade0d5c46
[mm, printk: introduce new format string for flags] pageflag_names array
ends with empty element {0, NULL}.

Signed-off-by: Andrey Skvortsov <[email protected]>
---
 memory.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/memory.c b/memory.c
index d6271bc..5d685ea 100644
--- a/memory.c
+++ b/memory.c
@@ -6352,6 +6352,11 @@ page_flags_init_from_pageflag_names(void)
                        break;
                }
 
+               if ((mask == 0UL) && !name) {   /* Linux 4.6 and later */
+                       len--;
+                       break;
+               }
+
                if (!read_string((ulong)name, namebuf, BUFSIZE-1)) {
                        error(INFO, "failed to read pageflag_names entry (i: 
%d, name: \"%s\", mask:%d)\n",
                                i, name, mask);
-- 
2.8.1

--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility

Reply via email to