X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fread_write.c;h=a091ee4f430df6cc83317b59c4a2fc363c005080;hb=e4543eddfd3bf3e0d625841377fa695a519edfd4;hp=b60324aaa2b6731d9ddedd67badaa7b5c9790a60;hpb=344a076110f4ecb16ea6d286b63be696604982ed;p=linux-2.6 diff --git a/fs/read_write.c b/fs/read_write.c index b60324aaa2..a091ee4f43 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -497,6 +497,9 @@ static ssize_t do_readv_writev(int type, struct file *file, } ret = rw_verify_area(type, file, pos, tot_len); + if (ret) + goto out; + ret = security_file_permission(file, type == READ ? MAY_READ : MAY_WRITE); if (ret) goto out;