Skip to content

Commit

Permalink
sunrpc: removed redundant procp check
Browse files Browse the repository at this point in the history
since vs_proc pointer is dereferenced before getting it's address there's
no need to check for NULL.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 8e5b677 ("SUNRPC: Add a callback to initialise server requests")
Signed-off-by: Aleksandr Aprelkov <aaprelkov@usergate.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
  • Loading branch information
Aleksandr Aprelkov authored and chucklever committed May 6, 2024
1 parent 7d12cce commit a576f36
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/sunrpc/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1265,8 +1265,6 @@ svc_generic_init_request(struct svc_rqst *rqstp,
if (rqstp->rq_proc >= versp->vs_nproc)
goto err_bad_proc;
rqstp->rq_procinfo = procp = &versp->vs_proc[rqstp->rq_proc];
if (!procp)
goto err_bad_proc;

/* Initialize storage for argp and resp */
memset(rqstp->rq_argp, 0, procp->pc_argzero);
Expand Down

0 comments on commit a576f36

Please sign in to comment.