Relax the rw_verify_area() error checking.
[linux-2.6-block.git] / arch / mips / kernel / linux32.c
index 330cf84d21feaf298636fe09b6d9be10d2637d03..60353f5acc48a42794bc9f5d19635a507e638176 100644 (file)
@@ -420,7 +420,7 @@ asmlinkage ssize_t sys32_pread(unsigned int fd, char * buf,
                goto out;
        pos = merge_64(a4, a5);
        ret = rw_verify_area(READ, file, &pos, count);
-       if (ret)
+       if (ret < 0)
                goto out;
        ret = -EINVAL;
        if (!file->f_op || !(read = file->f_op->read))
@@ -455,7 +455,7 @@ asmlinkage ssize_t sys32_pwrite(unsigned int fd, const char * buf,
                goto out;
        pos = merge_64(a4, a5);
        ret = rw_verify_area(WRITE, file, &pos, count);
-       if (ret)
+       if (ret < 0)
                goto out;
        ret = -EINVAL;
        if (!file->f_op || !(write = file->f_op->write))