diff options
-rw-r--r-- | fs/compat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/compat.c b/fs/compat.c index 5333c7d7427f..04f6fb53340c 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -1215,6 +1215,10 @@ static ssize_t compat_do_readv_writev(int type, struct file *file, if (ret < 0) goto out; + ret = security_file_permission(file, type == READ ? MAY_READ:MAY_WRITE); + if (ret) + goto out; + fnv = NULL; if (type == READ) { fn = file->f_op->read; |