Skip to content

Commit c8af9d3

Browse files
jtlaytonchucklever
authored andcommitted
sunrpc: reset rq_accept_statp when starting a new RPC
rq_accept_statp should point to the location of the accept_status in the reply. This field is not reset between RPCs so if svc_authenticate or pg_authenticate return SVC_DENIED without setting the pointer, it could result in the status being written to the wrong place. This pointer starts its lifetime as NULL. Reset it on every iteration so we get consistent behavior if this happens. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 6f0e262 commit c8af9d3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

net/sunrpc/svc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,6 +1334,9 @@ svc_process_common(struct svc_rqst *rqstp)
13341334
int pr, rc;
13351335
__be32 *p;
13361336

1337+
/* Reset the accept_stat for the RPC */
1338+
rqstp->rq_accept_statp = NULL;
1339+
13371340
/* Will be turned off only when NFSv4 Sessions are used */
13381341
set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags);
13391342
clear_bit(RQ_DROPME, &rqstp->rq_flags);

0 commit comments

Comments
 (0)