diff options
author | Alex Shi <alex.shi@linaro.org> | 2015-03-19 08:57:04 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2015-03-19 08:57:04 +0800 |
commit | ba0bfedf4c9cad58f56a7038d1462ffc21cd33df (patch) | |
tree | bc5582403ad15b835d1b69b2ab81bda44292f3e3 /fs/autofs4/dev-ioctl.c | |
parent | 43e7406efd7822d75c64310461d2cbca0ece19f0 (diff) | |
parent | 7f4e64246049cef5ae1eca37eec1701a9477799e (diff) |
Merge tag 'v3.10.72' into linux-linaro-lsklsk-v3.10-15.03linux-linaro-lsk-v3.10
This is the 3.10.72 stable release
Diffstat (limited to 'fs/autofs4/dev-ioctl.c')
-rw-r--r-- | fs/autofs4/dev-ioctl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index 743c7c2c949d..6aa8312ad89f 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c @@ -95,7 +95,7 @@ static int check_dev_ioctl_version(int cmd, struct autofs_dev_ioctl *param) */ static struct autofs_dev_ioctl *copy_dev_ioctl(struct autofs_dev_ioctl __user *in) { - struct autofs_dev_ioctl tmp; + struct autofs_dev_ioctl tmp, *res; if (copy_from_user(&tmp, in, sizeof(tmp))) return ERR_PTR(-EFAULT); @@ -103,7 +103,11 @@ static struct autofs_dev_ioctl *copy_dev_ioctl(struct autofs_dev_ioctl __user *i if (tmp.size < sizeof(tmp)) return ERR_PTR(-EINVAL); - return memdup_user(in, tmp.size); + res = memdup_user(in, tmp.size); + if (!IS_ERR(res)) + res->size = tmp.size; + + return res; } static inline void free_dev_ioctl(struct autofs_dev_ioctl *param) |