]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 May 2012 02:25:55 +0000 (19:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 May 2012 02:25:55 +0000 (19:25 -0700)
added patches:
sparc64-do-not-clobber-g2-in-xcall_fetch_glob_regs.patch

queue-3.0/series
queue-3.0/sparc64-do-not-clobber-g2-in-xcall_fetch_glob_regs.patch [new file with mode: 0644]

index 43857b2ccf917e8700f33ecc0d71dc2419b8e8b3..3655715c6cd6668225e43bc8b6fca5707d0db66d 100644 (file)
@@ -22,3 +22,4 @@ alsa-echoaudio-remove-incorrect-part-of-assertion.patch
 alsa-hda-lessen-cpu-usage-when-waiting-for-chip-to-respond.patch
 usbnet-fix-skb-traversing-races-during-unlink-v2.patch
 namespaces-pid_ns-fix-leakage-on-fork-failure.patch
+sparc64-do-not-clobber-g2-in-xcall_fetch_glob_regs.patch
diff --git a/queue-3.0/sparc64-do-not-clobber-g2-in-xcall_fetch_glob_regs.patch b/queue-3.0/sparc64-do-not-clobber-g2-in-xcall_fetch_glob_regs.patch
new file mode 100644 (file)
index 0000000..c5ac773
--- /dev/null
@@ -0,0 +1,52 @@
+From a5a737e090e25981e99d69f01400e3a80356581c Mon Sep 17 00:00:00 2001
+From: "David S. Miller" <davem@davemloft.net>
+Date: Thu, 10 May 2012 11:00:46 -0700
+Subject: sparc64: Do not clobber %g2 in xcall_fetch_glob_regs().
+
+From: "David S. Miller" <davem@davemloft.net>
+
+[ Upstream commit a5a737e090e25981e99d69f01400e3a80356581c ]
+
+%g2 is meant to hold the CPUID number throughout this routine, since
+at the very beginning, and at the very end, we use %g2 to calculate
+indexes into per-cpu arrays.
+
+However we erroneously clobber it in order to hold the %cwp register
+value mid-stream.
+
+Fix this code to use %g3 for the %cwp read and related calulcations
+instead.
+
+Reported-by: Meelis Roos <mroos@linux.ee>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/sparc/kernel/central.c |    2 +-
+ arch/sparc/mm/ultra.S       |    6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/sparc/kernel/central.c
++++ b/arch/sparc/kernel/central.c
+@@ -268,4 +268,4 @@ static int __init sunfire_init(void)
+       return 0;
+ }
+-subsys_initcall(sunfire_init);
++fs_initcall(sunfire_init);
+--- a/arch/sparc/mm/ultra.S
++++ b/arch/sparc/mm/ultra.S
+@@ -495,11 +495,11 @@ xcall_fetch_glob_regs:
+       stx             %o7, [%g1 + GR_SNAP_O7]
+       stx             %i7, [%g1 + GR_SNAP_I7]
+       /* Don't try this at home kids... */
+-      rdpr            %cwp, %g2
+-      sub             %g2, 1, %g7
++      rdpr            %cwp, %g3
++      sub             %g3, 1, %g7
+       wrpr            %g7, %cwp
+       mov             %i7, %g7
+-      wrpr            %g2, %cwp
++      wrpr            %g3, %cwp
+       stx             %g7, [%g1 + GR_SNAP_RPC]
+       sethi           %hi(trap_block), %g7
+       or              %g7, %lo(trap_block), %g7