File crash-linux-4.6-printk-flags.patch of Package crash.4149

From: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Date: Thu, 19 May 2016 14:01:19 -0400
Subject: Fix warning "failed to read pageflag_names entry" on Linux 4.6
References: bsc#978601
Git-commit: 7136bf8495948cb059e5595b8503f8ae37019fa1
Patch-mainline: 7.1.6

Fix for Linux commit edf14cdbf9a0e5ab52698ca66d07a76ade0d5c46, which has
appended a NULL entry as the final member of the pageflag_names[] array.

Without the patch, a message that indicates "crash: failed to read
pageflag_names entry" is displayed during session initialization in
Linux 4.6 kernels.

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>

---
 memory.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/memory.c
+++ b/memory.c
@@ -6352,8 +6352,13 @@ 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\n",
+			error(INFO, "failed to read pageflag_names entry (i: %d  name: \"%s\"  mask: %ld)\n",
 				i, name, mask);
 			goto pageflags_fail;
 		}