aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/exitcode.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-11-01 03:10:58 -0400
committerIngo Molnar <mingo@kernel.org>2013-11-01 03:24:41 -0400
commitfb10d5b7efbcc0aa9e46a9aa5ad86772c7bacb9a (patch)
treeea284fe7b9c17a85b8d3c4ba999d6e26d51a12f6 /arch/um/kernel/exitcode.c
parentf9f9ffc237dd924f048204e8799da74f9ecf40cf (diff)
parent52469b4fcd4fc433ffc78cec4cf94368e9052890 (diff)
Merge branch 'linus' into sched/core
Resolve cherry-picking conflicts: Conflicts: mm/huge_memory.c mm/memory.c mm/mprotect.c See this upstream merge commit for more details: 52469b4fcd4f Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/um/kernel/exitcode.c')
-rw-r--r--arch/um/kernel/exitcode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/um/kernel/exitcode.c b/arch/um/kernel/exitcode.c
index 829df49dee99..41ebbfebb333 100644
--- a/arch/um/kernel/exitcode.c
+++ b/arch/um/kernel/exitcode.c
@@ -40,9 +40,11 @@ static ssize_t exitcode_proc_write(struct file *file,
40 const char __user *buffer, size_t count, loff_t *pos) 40 const char __user *buffer, size_t count, loff_t *pos)
41{ 41{
42 char *end, buf[sizeof("nnnnn\0")]; 42 char *end, buf[sizeof("nnnnn\0")];
43 size_t size;
43 int tmp; 44 int tmp;
44 45
45 if (copy_from_user(buf, buffer, count)) 46 size = min(count, sizeof(buf));
47 if (copy_from_user(buf, buffer, size))
46 return -EFAULT; 48 return -EFAULT;
47 49
48 tmp = simple_strtol(buf, &end, 0); 50 tmp = simple_strtol(buf, &end, 0);