The pad adjustment logic in unwrap_priv_data() is unnecessary. gss_unwrap() should already updates buf->len correctly; the additional adjustment can drive buf->len negative. This causes the nfsd_request_too_large check to fail during some NFSv3 operations. Fixes: 31c9590ae468 ("SUNRPC: Add "@len" parameter to gss_unwrap()") Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx> --- net/sunrpc/auth_gss/svcauth_gss.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 7d83f54aaaa6..9ac23d83f9a2 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -989,8 +989,6 @@ unwrap_priv_data(struct svc_rqst *rqstp, struct xdr_buf *buf, u32 seq, struct gs fix_priv_head(buf, pad); maj_stat = gss_unwrap(ctx, 0, priv_len, buf); - pad = priv_len - buf->len; - buf->len -= pad; /* The upper layers assume the buffer is aligned on 4-byte boundaries. * In the krb5p case, at least, the data ends up offset, so we need to * move it around. */