diff options
Diffstat (limited to 'fs/compat.c')
| -rw-r--r-- | fs/compat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/compat.c b/fs/compat.c index 0781e619a62a..6556a9ce8a28 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
| @@ -532,7 +532,7 @@ out: | |||
| 532 | ssize_t compat_rw_copy_check_uvector(int type, | 532 | ssize_t compat_rw_copy_check_uvector(int type, |
| 533 | const struct compat_iovec __user *uvector, unsigned long nr_segs, | 533 | const struct compat_iovec __user *uvector, unsigned long nr_segs, |
| 534 | unsigned long fast_segs, struct iovec *fast_pointer, | 534 | unsigned long fast_segs, struct iovec *fast_pointer, |
| 535 | struct iovec **ret_pointer, int check_access) | 535 | struct iovec **ret_pointer) |
| 536 | { | 536 | { |
| 537 | compat_ssize_t tot_len; | 537 | compat_ssize_t tot_len; |
| 538 | struct iovec *iov = *ret_pointer = fast_pointer; | 538 | struct iovec *iov = *ret_pointer = fast_pointer; |
| @@ -579,7 +579,7 @@ ssize_t compat_rw_copy_check_uvector(int type, | |||
| 579 | } | 579 | } |
| 580 | if (len < 0) /* size_t not fitting in compat_ssize_t .. */ | 580 | if (len < 0) /* size_t not fitting in compat_ssize_t .. */ |
| 581 | goto out; | 581 | goto out; |
| 582 | if (check_access && | 582 | if (type >= 0 && |
| 583 | !access_ok(vrfy_dir(type), compat_ptr(buf), len)) { | 583 | !access_ok(vrfy_dir(type), compat_ptr(buf), len)) { |
| 584 | ret = -EFAULT; | 584 | ret = -EFAULT; |
| 585 | goto out; | 585 | goto out; |
| @@ -1094,7 +1094,7 @@ static ssize_t compat_do_readv_writev(int type, struct file *file, | |||
| 1094 | goto out; | 1094 | goto out; |
| 1095 | 1095 | ||
| 1096 | tot_len = compat_rw_copy_check_uvector(type, uvector, nr_segs, | 1096 | tot_len = compat_rw_copy_check_uvector(type, uvector, nr_segs, |
| 1097 | UIO_FASTIOV, iovstack, &iov, 1); | 1097 | UIO_FASTIOV, iovstack, &iov); |
| 1098 | if (tot_len == 0) { | 1098 | if (tot_len == 0) { |
| 1099 | ret = 0; | 1099 | ret = 0; |
| 1100 | goto out; | 1100 | goto out; |
