Blame SOURCES/github_1926150e_ppc64_stacksize.patch

608733
commit 1926150ee350e17fee2aeabb8ef781222d94366e
608733
Author: Dave Anderson <anderson@redhat.com>
608733
Date:   Mon Jun 11 13:46:41 2018 -0400
608733
608733
    Fix for the ppc64/ppc64le "bt" command on Linux 4.7 and later kernels
608733
    that contain commit d8bff643d81a58181356c0aa3ab771ac10da6894,
608733
    titled "[x86] asm: Make sure verify_cpu() has a good stack", which
608733
    inadvertently breaks the ppc64/ppc64le kernel stack size calculation
608733
    when running with crash-7.2.2 or later.  Without the patch, "bt" may
608733
    fail with a filtered kdump dumpfile with the two error messages
608733
    "bt: page excluded: kernel virtual address: <address> type: stack
608733
    contents" and "bt: read of stack at <address> failed".
608733
    (anderson@redhat.com)
608733
608733
diff --git a/task.c b/task.c
608733
index f6956d5..1b32629 100644
608733
--- a/task.c
608733
+++ b/task.c
608733
@@ -440,7 +440,7 @@ task_init(void)
608733
 	} else if (VALID_SIZE(thread_union) && 
608733
 	    	((len = SIZE(thread_union)) != STACKSIZE())) {
608733
 		machdep->stacksize = len;
608733
-	} else {
608733
+	} else if (!VALID_SIZE(thread_union) && !VALID_SIZE(task_union)) {
608733
 		if (kernel_symbol_exists("__start_init_task") &&
608733
 		    kernel_symbol_exists("__end_init_task")) {
608733
 			len = symbol_value("__end_init_task");