projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
qed: Add Light L2 support
[cascardo/linux.git]
/
fs
/
ioctl.c
diff --git
a/fs/ioctl.c
b/fs/ioctl.c
index
0f56deb
..
c415668
100644
(file)
--- a/
fs/ioctl.c
+++ b/
fs/ioctl.c
@@
-568,7
+568,7
@@
static int ioctl_fsthaw(struct file *filp)
return thaw_super(sb);
}
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;
{
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]);
}
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)) {
same = memdup_user(argp, size);
if (IS_ERR(same)) {