Blame SOURCES/github_64dad6d0.patch

608733
608733
commit 64dad6d0d60514498252e6071738fa1b4c12db8c
608733
Author: Dave Anderson <anderson@redhat.com>
608733
Date:   Thu Nov 29 14:21:19 2018 -0500
608733
608733
    Fix for the "ps -s" option on ARM64 if the number of tasks exceeds
608733
    2000.  Without the patch, the command ultimately fails with a
608733
    dump of the internal buffer allocation stats, followed by the
608733
    message "ps: cannot allocate any more memory!".
608733
    (anderson@redhat.com)
608733
608733
diff -up crash-7.2.3/task.c.orig crash-7.2.3/task.c
608733
--- crash-7.2.3/task.c.orig	2018-11-29 13:54:39.108320730 -0500
608733
+++ crash-7.2.3/task.c	2018-11-29 13:54:48.598279086 -0500
608733
@@ -4133,6 +4133,10 @@ task_pointer_string(struct task_context
608733
         		readmem(tc->task + OFFSET(task_struct_thread_ksp), 
608733
 				KVADDR, &bt->stkptr, sizeof(void *),
608733
                 		"thread_struct ksp", FAULT_ON_ERROR);
608733
+		} else if (VALID_MEMBER(task_struct_thread_context_sp)) {
608733
+			readmem(tc->task + OFFSET(task_struct_thread_context_sp), 
608733
+				KVADDR, &bt->stkptr, sizeof(void *),
608733
+				"cpu_context sp", FAULT_ON_ERROR);
608733
 		} else {
608733
 			if ((bt->stackbase = GET_STACKBASE(tc->task))) {
608733
 				bt->stacktop = GET_STACKTOP(tc->task);
608733
@@ -4140,6 +4144,8 @@ task_pointer_string(struct task_context
608733
 				bt->tc = tc;
608733
 				bt->flags |= BT_KSTACKP;
608733
 				back_trace(bt);
608733
+				if (bt->stackbuf)
608733
+					FREEBUF(bt->stackbuf);
608733
 			} else
608733
 				bt->stkptr = 0;
608733
 		}