mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
bced95283e
commit
c43e259cc7
3 changed files with 24 additions and 51 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue