diff options
Diffstat (limited to 'net/sunrpc/auth_gss/svcauth_gss.c')
| -rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 15 | 
1 files changed, 7 insertions, 8 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index db298b501c8..099a983797d 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -924,6 +924,7 @@ static inline int  gss_write_init_verf(struct svc_rqst *rqstp, struct rsi *rsip)  {  	struct rsc *rsci; +	int        rc;  	if (rsip->major_status != GSS_S_COMPLETE)  		return gss_write_null_verf(rqstp); @@ -932,7 +933,9 @@ gss_write_init_verf(struct svc_rqst *rqstp, struct rsi *rsip)  		rsip->major_status = GSS_S_NO_CONTEXT;  		return gss_write_null_verf(rqstp);  	} -	return gss_write_verf(rqstp, rsci->mechctx, GSS_SEQ_WIN); +	rc = gss_write_verf(rqstp, rsci->mechctx, GSS_SEQ_WIN); +	cache_put(&rsci->h, &rsc_cache); +	return rc;  }  /* @@ -1089,6 +1092,8 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp)  		}  		goto complete;  	case RPC_GSS_PROC_DESTROY: +		if (gss_write_verf(rqstp, rsci->mechctx, gc->gc_seq)) +			goto auth_err;  		set_bit(CACHE_NEGATIVE, &rsci->h.flags);  		if (resv->iov_len + 4 > PAGE_SIZE)  			goto drop; @@ -1196,13 +1201,7 @@ svcauth_gss_wrap_resp_integ(struct svc_rqst *rqstp)  	if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset,  				integ_len))  		BUG(); -	if (resbuf->page_len == 0 -			&& resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE -			< PAGE_SIZE) { -		BUG_ON(resbuf->tail[0].iov_len); -		/* Use head for everything */ -		resv = &resbuf->head[0]; -	} else if (resbuf->tail[0].iov_base == NULL) { +	if (resbuf->tail[0].iov_base == NULL) {  		if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE > PAGE_SIZE)  			goto out_err;  		resbuf->tail[0].iov_base = resbuf->head[0].iov_base  | 
