diff --git a/fs/compat.c b/fs/compat.c index 7f8e26ea427c4bed0d125c4fa051e28a7db6123f..2e32bd3404748d94aed3fef0e053d822c69d0ef1 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -1217,6 +1217,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;