]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
add s390 patch
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 Aug 2006 07:36:20 +0000 (00:36 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 Aug 2006 07:36:20 +0000 (00:36 -0700)
queue-2.6.17/s390-fix-futex_atomic_cmpxchg_inatomic.patch [new file with mode: 0644]
queue-2.6.17/series

diff --git a/queue-2.6.17/s390-fix-futex_atomic_cmpxchg_inatomic.patch b/queue-2.6.17/s390-fix-futex_atomic_cmpxchg_inatomic.patch
new file mode 100644 (file)
index 0000000..cf3bc23
--- /dev/null
@@ -0,0 +1,36 @@
+From foo@baz Tue Apr  9 12:12:43 2002
+Date: Wed, Jul 12 16:39:55 2006 +0200
+To: Greg KH <greg@kroah.com>
+From: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Subject: S390: fix futex_atomic_cmpxchg_inatomic
+
+
+[S390] fix futex_atomic_cmpxchg_inatomic
+
+futex_atomic_cmpxchg_inatomic has the same bug as the other
+atomic futex operations: the operation needs to be done in the
+user address space, not the kernel address space. Add the missing
+sacf 256 & sacf 0.
+
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/asm-s390/futex.h |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- linux-2.6.17.7.orig/include/asm-s390/futex.h
++++ linux-2.6.17.7/include/asm-s390/futex.h
+@@ -98,9 +98,10 @@ futex_atomic_cmpxchg_inatomic(int __user
+       if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
+               return -EFAULT;
+-      asm volatile("   cs   %1,%4,0(%5)\n"
++      asm volatile("   sacf 256\n"
++                   "   cs   %1,%4,0(%5)\n"
+                    "0: lr   %0,%1\n"
+-                   "1:\n"
++                   "1: sacf 0\n"
+ #ifndef __s390x__
+                    ".section __ex_table,\"a\"\n"
+                    "   .align 4\n"
index c391deb71bbd7634ee0644d7a8c3e85ed59f01a0..0df4550dddb3d17dcfc9413e6e21fa17ff4aafc1 100644 (file)
@@ -17,3 +17,4 @@ ext3-avoid-triggering-ext3_error-on-bad-nfs-file-handle.patch
 e1000-add-forgotten-pci-id-for-supported-device.patch
 cond_resched-fix.patch
 fix-budget-av-compile-failure.patch
+s390-fix-futex_atomic_cmpxchg_inatomic.patch