linux/fs/nfsd
Avi Kivity 69bbd9c7b9 nfs: fix nfs4d readlink truncated packet
XDR requires 4-byte alignment; nfs4d READLINK reply writes out the padding,
but truncates the packet to the padding-less size.

Fix by taking the padding into consideration when truncating the packet.

Symptoms:

	# ll /mnt/
	ls: cannot read symbolic link /mnt/test: Input/output error
	total 4
	-rw-r--r--. 1 root root  0 Jun 14 01:21 123456
	lrwxrwxrwx. 1 root root  6 Jul  2 03:33 test
	drwxr-xr-x. 1 root root  0 Jul  2 23:50 tmp
	drwxr-xr-x. 1 root root 60 Jul  2 23:44 tree

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Fixes: 476a7b1f4b (nfsd4: don't treat readlink like a zero-copy operation)
Reviewed-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2014-07-02 17:37:13 -04:00
..
acl.h
auth.c NFSD: Cleanup unused variable in nfsd_setuser() 2014-05-30 17:32:21 -04:00
auth.h
cache.h
current_stateid.h
export.c NFSD: Error out when getting more than one fsloc/secinfo/uuid 2014-05-30 17:32:25 -04:00
export.h NFSD: Using type of uint32_t for ex_nflavors instead of int 2014-05-30 17:32:24 -04:00
fault_inject.c
idmap.h
Kconfig
lockd.c
Makefile
netns.h
nfs2acl.c
nfs3acl.c
nfs3proc.c
nfs3xdr.c
nfs4acl.c
nfs4callback.c
nfs4idmap.c
nfs4proc.c nfsd: fix rare symlink decoding bug 2014-06-27 16:10:46 -04:00
nfs4recover.c
nfs4state.c NFSD: Don't hand out delegations for 30 seconds after recalling them. 2014-06-17 16:42:47 -04:00
nfs4xdr.c nfs: fix nfs4d readlink truncated packet 2014-07-02 17:37:13 -04:00
nfscache.c nfsd: don't halt scanning the DRC LRU list when there's an RC_INPROG entry 2014-06-06 19:22:49 -04:00
nfsctl.c
nfsd.h
nfsfh.c SUNRPC/NFSD: Remove using of dprintk with KERN_WARNING 2014-05-30 20:25:28 -04:00
nfsfh.h
nfsproc.c
nfssvc.c
nfsxdr.c
state.h
stats.c
stats.h
vfs.c nfsd: remove unused function nfsd_read_file 2014-05-30 17:32:27 -04:00
vfs.h nfsd: remove unused function nfsd_read_file 2014-05-30 17:32:27 -04:00
xdr3.h
xdr4.h
xdr4cb.h
xdr.h