]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Feb 2019 11:29:32 +0000 (12:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Feb 2019 11:29:32 +0000 (12:29 +0100)
added patches:
rcu-force-boolean-subscript-for-expedited-stall-warnings.patch

queue-4.4/rcu-force-boolean-subscript-for-expedited-stall-warnings.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/rcu-force-boolean-subscript-for-expedited-stall-warnings.patch b/queue-4.4/rcu-force-boolean-subscript-for-expedited-stall-warnings.patch
new file mode 100644 (file)
index 0000000..0161e94
--- /dev/null
@@ -0,0 +1,33 @@
+From ec3833ed02ae6ef2a933ece9de7cbab0c64c699e Mon Sep 17 00:00:00 2001
+From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
+Date: Mon, 11 Jan 2016 16:29:29 -0800
+Subject: rcu: Force boolean subscript for expedited stall warnings
+
+From: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
+
+commit ec3833ed02ae6ef2a933ece9de7cbab0c64c699e upstream.
+
+The cpu_online() function can return values other than 0 and 1, which
+can result in subscript overflow when applied to a two-element array.
+This commit allows for this behavior by using "!!" on the return value
+from cpu_online() when used as a subscript.
+
+Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
+Cc: "Rantala, Tommi" <tommi.t.rantala@nokia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/rcu/tree.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/rcu/tree.c
++++ b/kernel/rcu/tree.c
+@@ -3817,7 +3817,7 @@ static void synchronize_sched_expedited_
+                                       continue;
+                               rdp = per_cpu_ptr(rsp->rda, cpu);
+                               pr_cont(" %d-%c%c%c", cpu,
+-                                      "O."[cpu_online(cpu)],
++                                      "O."[!!cpu_online(cpu)],
+                                       "o."[!!(rdp->grpmask & rnp->expmaskinit)],
+                                       "N."[!!(rdp->grpmask & rnp->expmaskinitnext)]);
+                       }
index cfaf4906e4db3e5c113c77945063bed8cd0ef087..037f33434fb7740b4b7456fa0bba33ad3dccbb1f 100644 (file)
@@ -31,3 +31,4 @@ ipv4-frags-precedence-bug-in-ip_expire.patch
 inet-frags-better-deal-with-smp-races.patch
 net-fix-pskb_trim_rcsum_slow-with-odd-trim-offset.patch
 net-ipv4-do-not-handle-duplicate-fragments-as-overlapping.patch
+rcu-force-boolean-subscript-for-expedited-stall-warnings.patch