From: Alex Shi Date: Fri, 25 Nov 2016 04:50:56 +0000 (+0800) Subject: Merge remote-tracking branch 'lts/linux-4.4.y' into linux-linaro-lsk-v4.4 X-Git-Tag: firefly_0821_release~176^2~4^2~13 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5497d2d7d543b4b8854700d47a175e157fecbfd1;p=firefly-linux-kernel-4.4.55.git Merge remote-tracking branch 'lts/linux-4.4.y' into linux-linaro-lsk-v4.4 Conflicts: keep check_object_size in copy_from_user in arch/sparc/include/asm/uaccess_64.h --- 5497d2d7d543b4b8854700d47a175e157fecbfd1 diff --cc arch/sparc/include/asm/uaccess_64.h index 9c2b93bcb631,f428512481f9..a6847fc05a6d --- a/arch/sparc/include/asm/uaccess_64.h +++ b/arch/sparc/include/asm/uaccess_64.h @@@ -248,17 -207,7 +207,9 @@@ unsigned long __must_check ___copy_from static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long size) { - unsigned long ret; - + check_object_size(to, size, false); + - ret = ___copy_from_user(to, from, size); - if (unlikely(ret)) - ret = copy_from_user_fixup(to, from, size); - - return ret; + return ___copy_from_user(to, from, size); } #define __copy_from_user copy_from_user @@@ -268,16 -217,7 +219,9 @@@ unsigned long __must_check ___copy_to_u static inline unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long size) { - unsigned long ret; - + check_object_size(from, size, true); + - ret = ___copy_to_user(to, from, size); - if (unlikely(ret)) - ret = copy_to_user_fixup(to, from, size); - return ret; + return ___copy_to_user(to, from, size); } #define __copy_to_user copy_to_user