diff mbox

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

Message ID 52C58DC7.5090009@oracle.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Dave Kleikamp Jan. 2, 2014, 4:03 p.m. UTC
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.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/include/asm/uaccess_64.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Dave Kleikamp Jan. 2, 2014, 4:06 p.m. UTC | #1
Oops, sent this one to Hugh's old address this time.

On 01/02/2014 10:03 AM, Dave Kleikamp wrote:
> 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.
> 
> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> Cc: Hugh Dickins <hugh@veritas.com>
Cc: Hugh Dickins <hughd@google.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: sparclinux@vger.kernel.org
> ---
>  arch/sparc/include/asm/uaccess_64.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h
> index e562d3c..ad7e178 100644
> --- a/arch/sparc/include/asm/uaccess_64.h
> +++ b/arch/sparc/include/asm/uaccess_64.h
> @@ -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 *,
> 
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Jan. 2, 2014, 5:45 p.m. UTC | #2
From: Dave Kleikamp <dave.kleikamp@oracle.com>
Date: Thu, 02 Jan 2014 10:03:19 -0600

> 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.
> 
> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>

I got your first copy and it's properly queued up in patchwork,
you don't need to send it again, I've just been really busy.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dave Kleikamp Jan. 2, 2014, 5:51 p.m. UTC | #3
On 01/02/2014 11:45 AM, David Miller wrote:
> From: Dave Kleikamp <dave.kleikamp@oracle.com>
> Date: Thu, 02 Jan 2014 10:03:19 -0600
> 
>> 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.
>>
>> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> 
> I got your first copy and it's properly queued up in patchwork,
> you don't need to send it again, I've just been really busy.

Thanks. I understand. I hope you took time to enjoy the holidays as
well. :-)

Shaggy
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h
index e562d3c..ad7e178 100644
--- a/arch/sparc/include/asm/uaccess_64.h
+++ b/arch/sparc/include/asm/uaccess_64.h
@@ -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 *,