1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
Index: vserver-sources-2.1.1_2.6.15/fs/read_write.c
===================================================================
--- vserver-sources-2.1.1_2.6.15.orig/fs/read_write.c
+++ vserver-sources-2.1.1_2.6.15/fs/read_write.c
@@ -642,10 +642,10 @@ ssize_t vfs_sendfile(struct file *out_fi
if (!(in_file->f_mode & FMODE_PREAD))
return -ESPIPE;
- ret = rw_verify_area(FLOCK_VERIFY_READ, in_file, ppos, count);
- if (ret < 0)
+ //ret = rw_verify_area(FLOCK_VERIFY_READ, in_file, ppos, count);
+ ret = rw_verify_area(READ, in_file, ppos, count);
+ if (ret)
return ret;
- count = ret;
/* verify out_file */
out_inode = out_file->f_dentry->d_inode;
@@ -654,10 +654,10 @@ ssize_t vfs_sendfile(struct file *out_fi
if (!out_file->f_op || !out_file->f_op->sendpage)
return -EINVAL;
- ret = rw_verify_area(FLOCK_VERIFY_WRITE, out_file, &out_file->f_pos, count);
- if (ret < 0)
+ //ret = rw_verify_area(FLOCK_VERIFY_WRITE, out_file, &out_file->f_pos, count);
+ ret = rw_verify_area(WRITE, out_file, &out_file->f_pos, count);
+ if (ret)
return ret;
- count = ret;
ret = security_file_permission (out_file, MAY_WRITE);
if (ret)
|