[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210302062838.14267-5-jgross@suse.com>
Date: Tue, 2 Mar 2021 07:28:38 +0100
From: Juergen Gross <jgross@...e.com>
To: linux-kernel@...r.kernel.org
Cc: paulmck@...nel.org, mhocko@...e.com, peterz@...radead.org,
Juergen Gross <jgross@...e.com>
Subject: [PATCH v3 4/4] kernel/smp: fix flush_smp_call_function_queue() cpu offline detection
The warnings for flushing a logically offline cpu's call_single_queue
are gated by a wrong if statement. It should trigger when there have
been new requests before dequeueing them, not afterwards.
Signed-off-by: Juergen Gross <jgross@...e.com>
---
V3:
- new patch
---
kernel/smp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/smp.c b/kernel/smp.c
index 1a96691dbf7f..b3077c327b0a 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -581,7 +581,7 @@ static void flush_smp_call_function_queue(bool warn_cpu_offline)
/* There shouldn't be any pending callbacks on an offline CPU. */
if (unlikely(warn_cpu_offline && !cpu_online(smp_processor_id()) &&
- !warned && !llist_empty(head))) {
+ !warned && entry)) {
warned = true;
WARN(1, "IPI on offline CPU %d\n", smp_processor_id());
--
2.26.2
Powered by blists - more mailing lists