lkml.org 
[lkml]   [2021]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [syzbot] possible deadlock in wake_up_all_idle_cpus
Does this do anything useful?

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/smp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index ad0b68a3a3d36..b3bf528fa14d3 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -1170,14 +1170,14 @@ void wake_up_all_idle_cpus(void)
{
int cpu;

- cpus_read_lock();
+ migrate_disable();
for_each_online_cpu(cpu) {
if (cpu == raw_smp_processor_id())
continue;

wake_up_if_idle(cpu);
}
- cpus_read_unlock();
+ migrate_enable();
}
EXPORT_SYMBOL_GPL(wake_up_all_idle_cpus);

--
2.33.0
\
 
 \ /
  Last update: 2021-10-19 21:08    [W:0.085 / U:5.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site