rcu-tasks: Avoid rcu_tasks_trace_pertask() duplicate list additions
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 18 May 2022 00:38:02 +0000 (17:38 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 20 Jun 2022 16:22:29 +0000 (09:22 -0700)
commit19415004d5221ba59be6ef566fdbb52c44808f7e
treed66117cb3861158d14eb4f9129ffb9111bb8a3e1
parent1fa98e2e40e5a46fa528b6ab256ba00dfb319dde
rcu-tasks: Avoid rcu_tasks_trace_pertask() duplicate list additions

This commit adds checks within rcu_tasks_trace_pertask() to avoid
duplicate (and destructive) additions to the holdouts list.  These checks
will be required later due to the possibility of a given task having
blocked while in an RCU Tasks Trace read-side critical section, but now
running on a CPU.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: KP Singh <kpsingh@kernel.org>
kernel/rcu/tasks.h