summaryrefslogtreecommitdiffstats
path: root/fs/splice.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2008-01-12 22:05:48 +1100
committerJames Morris <jmorris@namei.org>2008-01-25 11:29:52 +1100
commitc43e259cc756ece387faae849af0058b56d78466 (patch)
tree1f1541560256b9fe2eeda5b07100baa14f39df59 /fs/splice.c
parentbced95283e9434611cbad8f2ff903cd396eaea72 (diff)
downloadlinux-stable-c43e259cc756ece387faae849af0058b56d78466.tar.gz
linux-stable-c43e259cc756ece387faae849af0058b56d78466.tar.bz2
linux-stable-c43e259cc756ece387faae849af0058b56d78466.zip
security: call security_file_permission from rw_verify_area
All instances of rw_verify_area() are followed by a call to security_file_permission(), so just call the latter from the former. Acked-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 6bdcb6107bc3..56b802bfbfa4 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -908,10 +908,6 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
if (unlikely(ret < 0))
return ret;
- ret = security_file_permission(out, MAY_WRITE);
- if (unlikely(ret < 0))
- return ret;
-
return out->f_op->splice_write(pipe, out, ppos, len, flags);
}
@@ -934,10 +930,6 @@ static long do_splice_to(struct file *in, loff_t *ppos,
if (unlikely(ret < 0))
return ret;
- ret = security_file_permission(in, MAY_READ);
- if (unlikely(ret < 0))
- return ret;
-
return in->f_op->splice_read(in, ppos, pipe, len, flags);
}