1
0
Fork 0
alistair23-linux/arch
Yann Droneaud ebf2d2689d perf/x86: Fix copy_from_user_nmi() return if range is not ok
Commit 0a196848ca ("perf: Fix arch_perf_out_copy_user default"),
changes copy_from_user_nmi() to return the number of
remaining bytes so that it behave like copy_from_user().

Unfortunately, when the range is outside of the process
memory, the return value  is still the number of byte
copied, eg. 0, instead of the remaining bytes.

As all users of copy_from_user_nmi() were modified as
part of commit 0a196848ca, the function should be
fixed to return the total number of bytes if range is
not correct.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1435001923-30986-1-git-send-email-ydroneaud@opteya.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-07-06 14:09:27 +02:00
..
alpha TTY/Serial driver patches for 4.2-rc1 2015-06-26 15:53:22 -07:00
arc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-07-04 19:36:06 -07:00
arm - hwspinlock core DT support from Suman Anna 2015-07-03 14:52:25 -07:00
arm64 Various arm64 fixes: 2015-07-03 12:28:30 -07:00
avr32 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-07-01 15:19:35 -07:00
blackfin Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-07-04 19:36:06 -07:00
c6x Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
cris Replace module_init with equivalent device_initcall in non modules. 2015-07-02 10:30:48 -07:00
frv Fix up implicit <module.h> users that will break later. 2015-07-02 10:25:22 -07:00
h8300 h8300: Always build dtb 2015-06-23 13:36:00 +09:00
hexagon Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
ia64 remove some boot noise from a now-invalid check that pages are reserved 2015-07-02 14:46:15 -07:00
m32r Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
m68k Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-07-01 15:19:35 -07:00
metag Merge branch 'akpm' (patches from Andrew) 2015-06-26 09:52:05 -07:00
microblaze Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
mips Devicetree changes for v4.2 2015-07-01 19:40:18 -07:00
mn10300 Replace module_init with equivalent device_initcall in non modules. 2015-07-02 10:30:48 -07:00
nios2 nios2 update for v4.2 2015-07-03 12:22:49 -07:00
openrisc Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
parisc Replace module_init with equivalent device_initcall in non modules. 2015-07-02 10:30:48 -07:00
powerpc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-07-04 19:36:06 -07:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-07-04 19:36:06 -07:00
score Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
sh Replace module_init with equivalent device_initcall in non modules. 2015-07-02 10:30:48 -07:00
sparc Merge branch 'akpm' (patches from Andrew) 2015-06-26 09:52:05 -07:00
tile Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-07-04 19:36:06 -07:00
um Minor merge needed, due to function move. 2015-07-01 10:49:25 -07:00
unicore32 arch/unicore32/kernel/fpu-ucf64.c: remove unnecessary KERN_ERR 2015-06-30 19:44:59 -07:00
x86 perf/x86: Fix copy_from_user_nmi() return if range is not ok 2015-07-06 14:09:27 +02:00
xtensa Replace module_init with equivalent device_initcall in non modules. 2015-07-02 10:30:48 -07:00
.gitignore
Kconfig clone: support passing tls argument via C rather than pt_regs magic 2015-06-25 17:00:38 -07:00