nfsd4: cast readlink() bug argument
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 27 Jul 2012 18:16:55 +0000 (14:16 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 10 Sep 2012 21:46:19 +0000 (17:46 -0400)
As we already do in readv, writev.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/vfs.c

index a9269f1..e76a17e 100644 (file)
@@ -1581,7 +1581,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
         */
 
        oldfs = get_fs(); set_fs(KERNEL_DS);
-       host_err = inode->i_op->readlink(path.dentry, buf, *lenp);
+       host_err = inode->i_op->readlink(path.dentry, (char __user *)buf, *lenp);
        set_fs(oldfs);
 
        if (host_err < 0)