Skip to content

Commit 0a7e596

Browse files
sashalevingregkh
authored andcommitted
kernel/smp.c:on_each_cpu_cond(): fix warning in fallback path
commit 618fde8 upstream. The rarely-executed memry-allocation-failed callback path generates a WARN_ON_ONCE() when smp_call_function_single() succeeds. Presumably it's supposed to warn on failures. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Cc: Christoph Lameter <cl@gentwo.org> Cc: Gilad Ben-Yossef <gilad@benyossef.com> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent da57491 commit 0a7e596

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/smp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ void on_each_cpu_cond(bool (*cond_func)(int cpu, void *info),
661661
if (cond_func(cpu, info)) {
662662
ret = smp_call_function_single(cpu, func,
663663
info, wait);
664-
WARN_ON_ONCE(!ret);
664+
WARN_ON_ONCE(ret);
665665
}
666666
preempt_enable();
667667
}

0 commit comments

Comments
 (0)