[Yaffs] [PATCH] yaffs_readlink() need __user pseudo-qualifie…

Top Page
Attachments:
Message as email
+ (text/plain)
+ 16-sparse-fix--yaffs_readlink-need-__user.diff (text/plain)
Delete this message
Reply to this message
Author: Luc Van Oostenryck
Date:  
To: yaffs
Subject: [Yaffs] [PATCH] yaffs_readlink() need __user pseudo-qualifier
In Linux-2.6, yaffs_readlink() need its buffer declared as "__user".
diff --git a/fs/yaffs2/yaffs_fs.c b/fs/yaffs2/yaffs_fs.c
--- a/fs/yaffs2/yaffs_fs.c
+++ b/fs/yaffs2/yaffs_fs.c
@@ -173,7 +173,7 @@ static int yaffs_writepage(struct page *
static int yaffs_prepare_write(struct file *f, struct page *pg, unsigned offset, unsigned to);
static int yaffs_commit_write(struct file *f, struct page *pg, unsigned offset, unsigned to);

-static int yaffs_readlink(struct dentry *dentry, char *buffer, int buflen);
+static int yaffs_readlink(struct dentry *dentry, char __user *buffer, int buflen);
static int yaffs_follow_link(struct dentry *dentry, struct nameidata *nd);


@@ -256,7 +256,7 @@ static void yaffs_GrossUnlock(yaffs_Devi

}

-static int yaffs_readlink(struct dentry *dentry, char *buffer, int buflen)
+static int yaffs_readlink(struct dentry *dentry, char __user *buffer, int buflen)
 {
     unsigned char *alias;
     int ret;