summaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-12-11 15:48:23 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-12-11 15:48:23 -0800
commita01c7800420d2c294ca403988488a635d4087a6d (patch)
treea0a5eeb436a297dffead2dfbccbb0ad3013aa7d1 /arch/x86/include
parentb925585039cf39275c2e0e57512e5df27fa73aad (diff)
downloadblackbird-op-linux-a01c7800420d2c294ca403988488a635d4087a6d.tar.gz
blackbird-op-linux-a01c7800420d2c294ca403988488a635d4087a6d.zip
nvram: Fix write beyond end condition; prove to gcc copy is safe
In nvram_write, first of all, correctly handle the case where the file pointer is already beyond the end; we should return EOF in that case. Second, make the logic a bit more explicit so that gcc can statically prove that the copy_from_user() is safe. Once the condition of the beyond-end filepointer is eliminated, the copy is safe but gcc can't prove it, causing build failures for i386 allyesconfig. Third, eliminate the entirely superfluous variable "len", and just use the passed-in variable "count" instead. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Arjan van de Ven <arjan@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <tip-*@git.kernel.org>
Diffstat (limited to 'arch/x86/include')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud