xfs
[Top] [All Lists]

[PATCH] annotation of xfs sendfile

To: torvalds@xxxxxxxx
Subject: [PATCH] annotation of xfs sendfile
From: viro@xxxxxxxxxxxxxxxx
Date: Wed, 25 Aug 2004 23:01:01 +0100
Cc: linux-xfs@xxxxxxxxxxx
Sender: linux-xfs-bounce@xxxxxxxxxxx
->sendfile() takes kernel pointer, not userland one.

diff -urN RC9-rc1-bk1-aio/fs/xfs/linux-2.6/xfs_file.c 
RC9-rc1-bk1-xfs-sendfile/fs/xfs/linux-2.6/xfs_file.c
--- RC9-rc1-bk1-aio/fs/xfs/linux-2.6/xfs_file.c Tue Aug 24 10:38:11 2004
+++ RC9-rc1-bk1-xfs-sendfile/fs/xfs/linux-2.6/xfs_file.c        Wed Aug 25 
17:39:05 2004
@@ -259,7 +259,7 @@
        loff_t                  *ppos,
        size_t                  count,
        read_actor_t            actor,
-       void                    __user *target)
+       void                    *target)
 {
        vnode_t                 *vp = LINVFS_GET_VP(filp->f_dentry->d_inode);
        ssize_t                 rval;
diff -urN RC9-rc1-bk1-aio/fs/xfs/linux-2.6/xfs_lrw.c 
RC9-rc1-bk1-xfs-sendfile/fs/xfs/linux-2.6/xfs_lrw.c
--- RC9-rc1-bk1-aio/fs/xfs/linux-2.6/xfs_lrw.c  Tue Aug 24 10:38:11 2004
+++ RC9-rc1-bk1-xfs-sendfile/fs/xfs/linux-2.6/xfs_lrw.c Wed Aug 25 17:39:15 2004
@@ -366,7 +366,7 @@
        int                     ioflags,
        size_t                  count,
        read_actor_t            actor,
-       void                    __user *target,
+       void                    *target,
        cred_t                  *credp)
 {
        ssize_t                 ret;
diff -urN RC9-rc1-bk1-aio/fs/xfs/linux-2.6/xfs_lrw.h 
RC9-rc1-bk1-xfs-sendfile/fs/xfs/linux-2.6/xfs_lrw.h
--- RC9-rc1-bk1-aio/fs/xfs/linux-2.6/xfs_lrw.h  Tue Aug 24 10:38:11 2004
+++ RC9-rc1-bk1-xfs-sendfile/fs/xfs/linux-2.6/xfs_lrw.h Wed Aug 25 17:39:23 2004
@@ -104,7 +104,7 @@
                                loff_t *, int, struct cred *);
 extern ssize_t xfs_sendfile(struct bhv_desc *, struct file *,
                                loff_t *, int, size_t, read_actor_t,
-                               void __user *, struct cred *);
+                               void *, struct cred *);
 
 extern int xfs_dev_is_read_only(struct xfs_mount *, char *);
 
diff -urN RC9-rc1-bk1-aio/fs/xfs/linux-2.6/xfs_vnode.h 
RC9-rc1-bk1-xfs-sendfile/fs/xfs/linux-2.6/xfs_vnode.h
--- RC9-rc1-bk1-aio/fs/xfs/linux-2.6/xfs_vnode.h        Tue Aug 24 10:38:11 2004
+++ RC9-rc1-bk1-xfs-sendfile/fs/xfs/linux-2.6/xfs_vnode.h       Wed Aug 25 
17:39:31 2004
@@ -192,7 +192,7 @@
                                loff_t *, int, struct cred *);
 typedef ssize_t (*vop_sendfile_t)(bhv_desc_t *, struct file *,
                                loff_t *, int, size_t, read_actor_t,
-                               void __user *, struct cred *);
+                               void *, struct cred *);
 typedef int    (*vop_ioctl_t)(bhv_desc_t *, struct inode *, struct file *,
                                int, unsigned int, void __user *);
 typedef int    (*vop_getattr_t)(bhv_desc_t *, struct vattr *, int,


<Prev in Thread] Current Thread [Next in Thread>