summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/rcu/tasks.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index 414861d65196..554b2e59a1d5 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -1433,8 +1433,9 @@ static void rcu_tasks_trace_pertask(struct task_struct *t,
struct list_head *hop)
{
// During early boot when there is only the one boot CPU, there
- // is no idle task for the other CPUs. Just return.
- if (unlikely(t == NULL))
+ // is no idle task for the other CPUs. Also, the grace-period
+ // kthread is always in a quiescent state. Either way, just return.
+ if (unlikely(t == NULL) || t == current)
return;
rcu_st_need_qs(t, 0);