aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/debug.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index c7fe1ea0e8ab..ce33780d8f20 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -150,7 +150,6 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)
150static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu) 150static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
151{ 151{
152 struct task_struct *g, *p; 152 struct task_struct *g, *p;
153 unsigned long flags;
154 153
155 SEQ_printf(m, 154 SEQ_printf(m,
156 "\nrunnable tasks:\n" 155 "\nrunnable tasks:\n"
@@ -159,14 +158,14 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
159 "------------------------------------------------------" 158 "------------------------------------------------------"
160 "----------------------------------------------------\n"); 159 "----------------------------------------------------\n");
161 160
162 read_lock_irqsave(&tasklist_lock, flags); 161 rcu_read_lock();
163 for_each_process_thread(g, p) { 162 for_each_process_thread(g, p) {
164 if (task_cpu(p) != rq_cpu) 163 if (task_cpu(p) != rq_cpu)
165 continue; 164 continue;
166 165
167 print_task(m, rq, p); 166 print_task(m, rq, p);
168 } 167 }
169 read_unlock_irqrestore(&tasklist_lock, flags); 168 rcu_read_unlock();
170} 169}
171 170
172void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) 171void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
@@ -331,9 +330,7 @@ do { \
331 print_cfs_stats(m, cpu); 330 print_cfs_stats(m, cpu);
332 print_rt_stats(m, cpu); 331 print_rt_stats(m, cpu);
333 332
334 rcu_read_lock();
335 print_rq(m, rq, cpu); 333 print_rq(m, rq, cpu);
336 rcu_read_unlock();
337 spin_unlock_irqrestore(&sched_debug_lock, flags); 334 spin_unlock_irqrestore(&sched_debug_lock, flags);
338 SEQ_printf(m, "\n"); 335 SEQ_printf(m, "\n");
339} 336}