diff options
author | H. Peter Anvin <[email protected]> | 2009-12-08 14:01:32 -0800 |
---|---|---|
committer | H. Peter Anvin <[email protected]> | 2009-12-11 15:27:47 -0800 |
commit | b925585039cf39275c2e0e57512e5df27fa73aad (patch) | |
tree | 1e264b4e3470013aabc10c27bf5054729b5b269f /lib/cpu-notifier-error-inject.c | |
parent | 2eaad1fddd7450a48ad464229775f97fbfe8af36 (diff) |
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 <[email protected]>
Cc: Brice Goglin <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
LKML-Reference: <[email protected]>
Diffstat (limited to 'lib/cpu-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions