From: H. Peter Anvin Date: Tue, 8 Dec 2009 22:01:32 +0000 (-0800) Subject: mm: Adjust do_pages_stat() so gcc can see copy_from_user() is safe X-Git-Tag: v2.6.33-rc1~277^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b925585039cf39275c2e0e57512e5df27fa73aad;p=pandora-kernel.git mm: Adjust do_pages_stat() so gcc can see copy_from_user() is safe Slightly adjust the logic for determining the size of the copy_form_user() in do_pages_stat(); with this change, gcc can see that the copying is safe. Without this, we get a build error for i386 allyesconfig: /home/hpa/kernel/linux-2.6-tip.urgent/arch/x86/include/asm/uaccess_32.h:213: error: call to ‘copy_from_user_overflow’ declared with attribute error: copy_from_user() buffer size is not provably correct Unlike an earlier patch from Arjan, this doesn't introduce new variables; merely reshuffles the compare so that gcc can see that an overflow cannot happen. Signed-off-by: H. Peter Anvin Cc: Brice Goglin Cc: Arjan van de Ven Cc: Andrew Morton Cc: KOSAKI Motohiro LKML-Reference: <20090926205406.30d55b08@infradead.org> --- Reading git-diff-tree failed