Messages in this thread Patch in this message | | | Date | Mon, 19 Apr 2004 11:17:31 +0100 | From | Jamie Lokier <> | Subject | [PATCH] Use get_user for 64-bit read in sendfile64 |
| |
Patch: sendfile64_get_user-2.6.5 Requires: uaccess64-2.6.5-jl2
Use get_user instead of copy_from_user to read a loff_t. Compiled output is identical on i386.
--- orig-2.6.5/fs/read_write.c 2004-04-14 08:29:43.000000000 +0100 +++ uaccess64-2.6.5/fs/read_write.c 2004-04-19 10:35:35.000000000 +0100 @@ -644,7 +644,7 @@ ssize_t ret; if (offset) { - if (unlikely(copy_from_user(&pos, offset, sizeof(loff_t)))) + if (unlikely(get_user(pos, offset))) return -EFAULT; ret = do_sendfile(out_fd, in_fd, &pos, count, 0); if (unlikely(put_user(pos, offset))) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |