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>
This commit is contained in:
parent
a76ff6884b
commit
82efed06d5
|
@ -395,7 +395,7 @@ static void rcu_print_detail_task_stall_rnp(struct rcu_node *rnp)
|
||||||
raw_spin_unlock_irqrestore(&rnp->lock, flags);
|
raw_spin_unlock_irqrestore(&rnp->lock, flags);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
t = list_entry(rnp->gp_tasks,
|
t = list_entry(rnp->gp_tasks->prev,
|
||||||
struct task_struct, rcu_node_entry);
|
struct task_struct, rcu_node_entry);
|
||||||
list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry)
|
list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry)
|
||||||
sched_show_task(t);
|
sched_show_task(t);
|
||||||
|
@ -452,7 +452,7 @@ static int rcu_print_task_stall(struct rcu_node *rnp)
|
||||||
if (!rcu_preempt_blocked_readers_cgp(rnp))
|
if (!rcu_preempt_blocked_readers_cgp(rnp))
|
||||||
return 0;
|
return 0;
|
||||||
rcu_print_task_stall_begin(rnp);
|
rcu_print_task_stall_begin(rnp);
|
||||||
t = list_entry(rnp->gp_tasks,
|
t = list_entry(rnp->gp_tasks->prev,
|
||||||
struct task_struct, rcu_node_entry);
|
struct task_struct, rcu_node_entry);
|
||||||
list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry) {
|
list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry) {
|
||||||
pr_cont(" P%d", t->pid);
|
pr_cont(" P%d", t->pid);
|
||||||
|
|
Loading…
Reference in New Issue