Skip to contentSkip to conversation

Patch "Revert "sparc64: Fix __copy_{to,from}_user_inatomic defines."" has

3.11.y.z extended stable Luis Henriques 1 participant 1 message Apr 16, 2014 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

This is a note to let you know that I have just added a patch titled

Revert "sparc64: Fix __copy_{to,from}_user_inatomic defines."

to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree which can be found at:

http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue

If you, or anyone else, feels it should not be added to this tree, please reply to this email.

For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

From d507050d7c8cb2fc980057f7f70a9092140b76ef Mon Sep 17 00:00:00 2001
From: Dave Kleikamp <[email protected]>
Date: Mon, 16 Dec 2013 15:01:00 -0600
Subject: Revert "sparc64: Fix __copy_{to,from}_user_inatomic defines."

commit 16932237f2978a2265662f8de4af743b1f55a209 upstream.

This reverts commit 145e1c0023585e0e8f6df22316308ec61c5066b2.

This commit broke the behavior of __copy_from_user_inatomic when it is only partially successful. Instead of returning the number of bytes not copied, it now returns 1. This translates to the wrong value being returned by iov_iter_copy_from_user_atomic.

xfstests generic/246 and LTP writev01 both fail on btrfs and nfs because of this.

---
 arch/sparc/include/asm/uaccess_64.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/sparc/include/asm/uaccess_64.h +2 -2
index e562d3c..ad7e178 100644
@@ -262,8 +262,8 @@ extern unsigned long __must_check __clear_user(void __user *, unsigned long);
 extern __must_check long strlen_user(const char __user *str);
 extern __must_check long strnlen_user(const char __user *str, long n);
 
-#define __copy_to_user_inatomic ___copy_to_user
-#define __copy_from_user_inatomic ___copy_from_user
+#define __copy_to_user_inatomic __copy_to_user
+#define __copy_from_user_inatomic __copy_from_user
 
 struct pt_regs;
 extern unsigned long compute_effective_address(struct pt_regs *,

--
1.9.1