From: Alexey Makhalov <alexey.makhalov(a)broadcom.com>
vmware_vmss_get_cpu_reg() whould be called only for active tasks
to get their registers from corresponding CPUs.
Otherwise, the standard path of fetching pt_regs from the memory
(inactive_task_frame) should be used.
Cc: Sourabh Jain <sourabhjain(a)linux.ibm.com>
Cc: Hari Bathini <hbathini(a)linux.ibm.com>
Cc: Mahesh J Salgaonkar <mahesh(a)linux.ibm.com>
Cc: Naveen N. Rao <naveen.n.rao(a)linux.vnet.ibm.com>
Cc: Lianbo Jiang <lijiang(a)redhat.com>
Cc: HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab(a)nec.com>
Cc: Tao Liu <ltao(a)redhat.com>
Cc: Alexey Makhalov <alexey.makhalov(a)broadcom.com>
Signed-off-by: Alexey Makhalov <alexey.makhalov(a)broadcom.com>
---
x86_64.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/x86_64.c b/x86_64.c
index 47c215f..617a4ab 100644
--- a/x86_64.c
+++ b/x86_64.c
@@ -9232,7 +9232,10 @@ x86_64_get_current_task_reg(int regno, const char *name,
if (!tc)
return FALSE;
- if (VMSS_DUMPFILE())
+ /*
+ * Task is active, grab CPU's registers
+ */
+ if (is_task_active(tc->task) && VMSS_DUMPFILE())
return vmware_vmss_get_cpu_reg(tc->processor, regno, name, size, value);
BZERO(&bt_setup, sizeof(struct bt_info));
--
2.40.1