nfsd: fix __fh_verify for localio
__fh_verify() added a call to svc_xprt_set_valid() to help do connection
management but during LOCALIO path rqstp argument is NULL, leading to
NULL pointer dereferencing and a crash.
Fixes: eccbbc7c00
("nfsd: don't use sv_nrthreads in connection limiting calculations.")
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
5fb2516121
commit
d9d6b74e4b
1 changed files with 3 additions and 2 deletions
|
@ -381,8 +381,9 @@ __fh_verify(struct svc_rqst *rqstp,
|
|||
error = check_nfsd_access(exp, rqstp, may_bypass_gss);
|
||||
if (error)
|
||||
goto out;
|
||||
|
||||
svc_xprt_set_valid(rqstp->rq_xprt);
|
||||
/* During LOCALIO call to fh_verify will be called with a NULL rqstp */
|
||||
if (rqstp)
|
||||
svc_xprt_set_valid(rqstp->rq_xprt);
|
||||
|
||||
/* Finally, check access permissions. */
|
||||
error = nfsd_permission(cred, exp, dentry, access);
|
||||
|
|
Loading…
Add table
Reference in a new issue