lkml.org 
[lkml]   [2004]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/
\
 
 \ /
  Last update: 2005-03-22 14:02    [W:1.440 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site