linux-stable/net/sunrpc
Chuck Lever 2b7bbc963d SUNRPC: Fix large reads on NFS/RDMA
After commit a11a2bf4, "SUNRPC: Optimise away unnecessary data moves
in xdr_align_pages", Thu Aug 2 13:21:43 2012, READs larger than a
few hundred bytes via NFS/RDMA no longer work.  This commit exposed
a long-standing bug in rpcrdma_inline_fixup().

I reproduce this with an rsize=4096 mount using the cthon04 basic
tests.  Test 5 fails with an EIO error.

For my reproducer, kernel log shows:

  NFS: server cheating in read reply: count 4096 > recvd 0

rpcrdma_inline_fixup() is zeroing the xdr_stream::page_len field,
and xdr_align_pages() is now returning that value to the READ XDR
decoder function.

That field is set up by xdr_inline_pages() by the READ XDR encoder
function.  As far as I can tell, it is supposed to be left alone
after that, as it describes the dimensions of the reply xdr_stream,
not the contents of that stream.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68391
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2014-03-17 15:30:38 -04:00
..
auth_gss SUNRPC: Fix a pipe_version reference leak 2014-02-16 13:28:01 -05:00
xprtrdma SUNRPC: Fix large reads on NFS/RDMA 2014-03-17 15:30:38 -04:00
addr.c sunrpc: move address copy/cmp/convert routines and prototypes from clnt.h to addr.h 2013-02-05 09:41:14 -05:00
auth.c shrinker: convert remaining shrinkers to count/scan API 2013-09-10 18:56:32 -04:00
auth_generic.c sunrpc: Add missing kuids conversion for printing 2013-09-12 10:16:06 -04:00
auth_null.c SUNRPC refactor rpcauth_checkverf error returns 2013-09-03 15:25:09 -04:00
auth_unix.c SUNRPC refactor rpcauth_checkverf error returns 2013-09-03 15:25:09 -04:00
backchannel_rqst.c SUNRPC: RPC callbacks may be split across several TCP segments 2014-02-11 14:01:20 -05:00
bc_svc.c SUNRPC: remove BUG_ON from bc_send 2012-11-04 14:43:41 -05:00
cache.c Merge branch 'for-3.14' of git://linux-nfs.org/~bfields/linux 2014-01-30 10:18:43 -08:00
clnt.c SUNRPC: Ensure that call_bind times out correctly 2014-03-17 15:14:18 -04:00
Kconfig Merge branch 'rpcsec_gss-from_cel' into linux-next 2013-04-23 15:40:40 -04:00
Makefile SUNRPC: sunrpc should not explicitly depend on NFS config options 2011-07-15 09:12:23 -04:00
netns.h Merge branch 'for-3.14' of git://linux-nfs.org/~bfields/linux 2014-01-30 10:18:43 -08:00
rpc_pipe.c rpc_pipe: fix cleanup of dummy gssd directory when notification fails 2013-12-10 19:39:53 +02:00
rpcb_clnt.c SUNRPC: If the rpcbind channel is disconnected, fail the call to unregister 2013-08-07 17:07:18 -04:00
sched.c SUNRPC: Ensure rpc_task->tk_pid is available for tracepoints 2013-09-04 14:45:13 -04:00
socklib.c sunrpc: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:28 +08:00
stats.c SUNRPC: Deprecate rpc_client->cl_protname 2013-08-30 09:19:34 -04:00
sunrpc.h SUNRPC: subscribe RPC clients to pipefs notifications 2012-01-31 18:20:25 -05:00
sunrpc_syms.c sunrpc: create a new dummy pipe for gssd to hold open 2013-12-06 13:06:30 -05:00
svc.c SUNRPC/NFSD: Support a new option for ignoring the result of svc_register 2014-01-03 18:18:49 -05:00
svc_xprt.c svcrpc: fix rpc server shutdown races 2013-02-17 10:53:51 -05:00
svcauth.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
svcauth_unix.c svcrpc: fix failures to handle -1 uid's 2013-07-08 17:27:23 -04:00
svcsock.c net: fix build errors if ipv6 is disabled 2013-10-09 13:04:03 -04:00
sysctl.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00
timer.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
xdr.c SUNRPC: Fix memory corruption issue on 32-bit highmem systems 2013-08-28 15:43:43 -04:00
xprt.c NFS client updates for Linux 3.14 2014-01-28 08:46:44 -08:00
xprtsock.c SUNRPC: RPC callbacks may be split across several TCP segments 2014-02-11 14:01:20 -05:00