summaryrefslogtreecommitdiffstats
path: root/kernel/arch/x86/lib/usercopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/x86/lib/usercopy.c')
-rw-r--r--kernel/arch/x86/lib/usercopy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/arch/x86/lib/usercopy.c b/kernel/arch/x86/lib/usercopy.c
index ddf9ecb53..e342586db 100644
--- a/kernel/arch/x86/lib/usercopy.c
+++ b/kernel/arch/x86/lib/usercopy.c
@@ -20,7 +20,7 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
unsigned long ret;
if (__range_not_ok(from, n, TASK_SIZE))
- return 0;
+ return n;
/*
* Even though this function is typically called from NMI/IRQ context