summaryrefslogtreecommitdiff
path: root/fs/ioctl.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-09-20 08:29:21 +0200
committerIngo Molnar <mingo@kernel.org>2016-09-20 08:29:21 +0200
commitb2c16e1efddeb517c62d242fb8ec30a383843468 (patch)
treefbfbe6f124a9423abf9a288ad46feb6db7469c42 /fs/ioctl.c
parent81539169f283329fd8bc58457cc15754f683ba69 (diff)
parentd2ffb0103aaefa9b169da042cf39ce27bfb6cdbb (diff)
downloadlinux-b2c16e1efddeb517c62d242fb8ec30a383843468.tar.gz
linux-b2c16e1efddeb517c62d242fb8ec30a383843468.tar.bz2
linux-b2c16e1efddeb517c62d242fb8ec30a383843468.zip
Merge branch 'linus' into x86/asm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/ioctl.c')
-rw-r--r--fs/ioctl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c
index 0f56deb24ce6..c415668c86d4 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -568,7 +568,7 @@ static int ioctl_fsthaw(struct file *filp)
return thaw_super(sb);
}
-static long ioctl_file_dedupe_range(struct file *file, void __user *arg)
+static int ioctl_file_dedupe_range(struct file *file, void __user *arg)
{
struct file_dedupe_range __user *argp = arg;
struct file_dedupe_range *same = NULL;
@@ -582,6 +582,10 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg)
}
size = offsetof(struct file_dedupe_range __user, info[count]);
+ if (size > PAGE_SIZE) {
+ ret = -ENOMEM;
+ goto out;
+ }
same = memdup_user(argp, size);
if (IS_ERR(same)) {