summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_null.c
diff options
context:
space:
mode:
authorChuck Lever2019-02-11 17:25:36 +0100
committerAnna Schumaker2019-02-14 17:48:36 +0100
commit35e77d21baa04b554bf3dc9a08dfa7e569286e51 (patch)
treed6e48672b6fbd6ce82ba47438295b18b53b2c4b0 /net/sunrpc/auth_null.c
parentSUNRPC: Make AUTH_SYS and AUTH_NULL set au_verfsize (diff)
downloadkernel-qcow2-linux-35e77d21baa04b554bf3dc9a08dfa7e569286e51.tar.gz
kernel-qcow2-linux-35e77d21baa04b554bf3dc9a08dfa7e569286e51.tar.xz
kernel-qcow2-linux-35e77d21baa04b554bf3dc9a08dfa7e569286e51.zip
SUNRPC: Add rpc_auth::au_ralign field
Currently rpc_inline_rcv_pages() uses au_rslack to estimate the size of the upper layer reply header. This is fine for auth flavors where au_verfsize == au_rslack. However, some auth flavors have more going on. krb5i for example has two more words after the verifier, and another blob following the RPC message. The calculation involving au_rslack pushes the upper layer reply header too far into the rcv_buf. au_rslack is still valuable: it's the amount of buffer space needed for the reply, and is used when allocating the reply buffer. We'll keep that. But, add a new field that can be used to properly estimate the location of the upper layer header in each RPC reply, based on the auth flavor in use. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/auth_null.c')
-rw-r--r--net/sunrpc/auth_null.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c
index 9ae08248a9e1..41a633a4049e 100644
--- a/net/sunrpc/auth_null.c
+++ b/net/sunrpc/auth_null.c
@@ -115,6 +115,7 @@ struct rpc_auth null_auth = {
.au_cslack = NUL_CALLSLACK,
.au_rslack = NUL_REPLYSLACK,
.au_verfsize = NUL_REPLYSLACK,
+ .au_ralign = NUL_REPLYSLACK,
.au_ops = &authnull_ops,
.au_flavor = RPC_AUTH_NULL,
.au_count = REFCOUNT_INIT(1),