Commit 3c7e45bd authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] jantior: coda: userspace error handling

From: Domen Puncer <domen@coderock.org>

Drop verify_area, using copy*user already (instead).
Also user -EFAULT for error instead of -EINVAL.
parent 81046ff7
......@@ -588,14 +588,10 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid,
if (outp->coda_ioctl.len > data->vi.out_size) {
error = -EINVAL;
} else {
error = verify_area(VERIFY_WRITE, data->vi.out,
data->vi.out_size);
if ( error ) goto exit;
if (copy_to_user(data->vi.out,
(char *)outp + (long)outp->coda_ioctl.data,
data->vi.out_size)) {
error = -EINVAL;
error = -EFAULT;
goto exit;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment