]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.16.3/kernel-smp.c-on_each_cpu_cond-fix-warning-in-fallback-path.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.16.3 / kernel-smp.c-on_each_cpu_cond-fix-warning-in-fallback-path.patch
1 From 618fde872163e782183ce574c77f1123e2be8887 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sasha.levin@oracle.com>
3 Date: Wed, 6 Aug 2014 16:08:14 -0700
4 Subject: kernel/smp.c:on_each_cpu_cond(): fix warning in fallback path
5
6 From: Sasha Levin <sasha.levin@oracle.com>
7
8 commit 618fde872163e782183ce574c77f1123e2be8887 upstream.
9
10 The rarely-executed memry-allocation-failed callback path generates a
11 WARN_ON_ONCE() when smp_call_function_single() succeeds. Presumably
12 it's supposed to warn on failures.
13
14 Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
15 Cc: Christoph Lameter <cl@gentwo.org>
16 Cc: Gilad Ben-Yossef <gilad@benyossef.com>
17 Cc: David Rientjes <rientjes@google.com>
18 Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
19 Cc: Tejun Heo <htejun@gmail.com>
20 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
21 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24 ---
25 kernel/smp.c | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28 --- a/kernel/smp.c
29 +++ b/kernel/smp.c
30 @@ -661,7 +661,7 @@ void on_each_cpu_cond(bool (*cond_func)(
31 if (cond_func(cpu, info)) {
32 ret = smp_call_function_single(cpu, func,
33 info, wait);
34 - WARN_ON_ONCE(!ret);
35 + WARN_ON_ONCE(ret);
36 }
37 preempt_enable();
38 }