Skip to content

Commit

Permalink
nfsd4: cast readlink() bug argument
Browse files Browse the repository at this point in the history
As we already do in readv, writev.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
J. Bruce Fields committed Sep 10, 2012
1 parent 9959ba0 commit fac7a17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fac7a17

Please sign in to comment.