sparc: copy_from_user() should not return -EFAULT
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 6 Jan 2010 04:41:48 +0000 (20:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jan 2010 04:41:48 +0000 (20:41 -0800)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found