[Crash-utility] [PATCH] fix missing RT PRIO_ARRAY table with CONFIG_RT_GROUP_SCHED=n

Mitsuya Shibata mty.shibata at gmail.com
Fri Jan 23 13:34:08 UTC 2015


On the kernel with CONFIG_RT_GROUP_SCHED=n, the "RT PRIO_ARRAY" table of runq
command always empty, nevertheless exists "rt_sched_class" task.

This cause to substract offset "task_struct->rt - task_struct" only if there is
my_q member (ie. CONFIG_RT_GROUP_SCHED=y). Therefore dump_RT_prio_array()
passes the address of "rt member of task_struct" to task_to_context().

This patch ensure to pass the address of "task_struct" to task_to_context().
---
 task.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/task.c b/task.c
index 147ff5c..50c82c8 100644
--- a/task.c
+++ b/task.c
@@ -8688,9 +8688,9 @@ dump_RT_prio_array(ulong k_prio_array, char *u_prio_array)
 						&rt_rq_buf[OFFSET(rt_rq_active)]);
 					FREEBUF(rt_rq_buf);
 					continue;
-				} else
-					task_addr -= OFFSET(task_struct_rt);
+				}
 			}
+			task_addr -= OFFSET(task_struct_rt);
 			if (!(tc = task_to_context(task_addr)))
 				continue;
 
-- 
1.9.1




More information about the Crash-utility mailing list