summaryrefslogtreecommitdiffstats
path: root/kernel/rcu
diff options
context:
space:
mode:
authorPatrick Daly <pdaly@codeaurora.org>2015-04-07 18:12:07 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-05-27 15:58:02 -0400
commit82efed06d5e370f1526ec93ff4c2c2496542f615 (patch)
tree9f0cc0df8657d5260f9735491b0631e5a68e32bf /kernel/rcu
parenta76ff6884bfedfafcbb0d9c84c7a6b6a546cba6d (diff)
rcu: Fix missing task information during rcu-preempt stall
The first item list_for_each_entry_continue(alist) iterates over is alist->next, rather than alist itself. Consequently, rcu_print_detail_task_stall_rnp() skips the task referenced by gp_tasks. Use gp_tasks->prev as the argument to list_for_each_entry_continue() instead. Signed-off-by: Patrick Daly <pdaly@codeaurora.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/tree_plugin.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index f8af20273868..853c7b8ea833 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -395,7 +395,7 @@ static void rcu_print_detail_task_stall_rnp(struct rcu_node *rnp)
395 raw_spin_unlock_irqrestore(&rnp->lock, flags); 395 raw_spin_unlock_irqrestore(&rnp->lock, flags);
396 return; 396 return;
397 } 397 }
398 t = list_entry(rnp->gp_tasks, 398 t = list_entry(rnp->gp_tasks->prev,
399 struct task_struct, rcu_node_entry); 399 struct task_struct, rcu_node_entry);
400 list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry) 400 list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry)
401 sched_show_task(t); 401 sched_show_task(t);
@@ -452,7 +452,7 @@ static int rcu_print_task_stall(struct rcu_node *rnp)
452 if (!rcu_preempt_blocked_readers_cgp(rnp)) 452 if (!rcu_preempt_blocked_readers_cgp(rnp))
453 return 0; 453 return 0;
454 rcu_print_task_stall_begin(rnp); 454 rcu_print_task_stall_begin(rnp);
455 t = list_entry(rnp->gp_tasks, 455 t = list_entry(rnp->gp_tasks->prev,
456 struct task_struct, rcu_node_entry); 456 struct task_struct, rcu_node_entry);
457 list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry) { 457 list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry) {
458 pr_cont(" P%d", t->pid); 458 pr_cont(" P%d", t->pid);