From: Heiko Carstens Date: Tue, 5 Jan 2010 13:19:11 +0000 (+0100) Subject: x86: copy_from_user() should not return -EFAULT X-Git-Tag: v2.6.33-rc4~70^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=409d02ef6d74f5e91f5ea4c587b2ee1375f106fc;p=pandora-kernel.git x86: copy_from_user() should not return -EFAULT 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. [ hpa: code is not in .32 so not needed for -stable ] Signed-off-by: Heiko Carstens Acked-by: Arjan van de Ven LKML-Reference: <20100105131911.GC5480@osiris.boeblingen.de.ibm.com> Signed-off-by: H. Peter Anvin --- Reading git-diff-tree failed