[Yaffs] [PATCH] yaffs_readlink() need __user pseudo-qualifier

Luc Van Oostenryck lkml at looxix.net
Tue Jul 19 01:57:22 BST 2005


In Linux-2.6, yaffs_readlink() need its buffer declared as "__user".
-------------- next part --------------
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;


More information about the yaffs mailing list