lkml.org 
[lkml]   [2010]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] sparc: copy_from_user() should not return -EFAULT
Date
On Tuesday 05 January 2010, Heiko Carstens wrote:
> Subject: [PATCH] sparc: copy_from_user() should not return -EFAULT
>
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
>
> Callers of copy_from_user() expect it to return the number of bytes
> it could not copy. In no case it is supposed to return -EFAULT.
>
> In case of a detected buffer overflow just return the requested
> length. In addition one could think of a memset that would clear
> the size of the target object.
>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>

The xtensa clear_user function seems to have a similar issue,
it should return size on failure, not -EFAULT.

Arnd


\
 
 \ /
  Last update: 2010-01-05 18:59    [W:0.275 / U:0.828 seconds]
©2003-2014 Jasper Spaans. Advertise on this site