From 0f83cef0d56c3da58b9b694f2ca54ce7ab9a9db7 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 23 Feb 2022 17:22:12 +0800 Subject: [PATCH] rcu-tasks: Make ksoftirqd provide RCU Tasks quiescent states MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mainline inclusion from mainline-v5.14-rc1 commit cf868c2af244417ed276ba7f716b980841a71340 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4U05V CVE: NA ------------------------------------------------------------------------- Heavy networking load can cause a CPU to execute continuously and indefinitely within ksoftirqd, in which case there will be no voluntary task switches and thus no RCU-tasks quiescent states. This commit therefore causes the exiting rcu_softirq_qs() to provide an RCU-tasks quiescent state. This of course means that __do_softirq() and its callers cannot be invoked from within a tracing trampoline. Reported-by: Toke Høiland-Jørgensen Tested-by: Toke Høiland-Jørgensen Reviewed-by: Masami Hiramatsu Signed-off-by: Paul E. McKenney Cc: Steven Rostedt Cc: Masami Hiramatsu Signed-off-by: Zhen Lei Reviewed-by: Cheng Jian Reviewed-by: Cheng Jian Signed-off-by: Zheng Zengkai --- kernel/rcu/tree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 1f6c78aa7bfd..b9c45b2d7690 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -236,6 +236,7 @@ void rcu_softirq_qs(void) { rcu_qs(); rcu_preempt_deferred_qs(current); + rcu_tasks_qs(current, false); } /* -- GitLab