Blame SOURCES/github_1926150e_ppc64_stacksize.patch

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