Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Aleksandr Aprelkov <aaprelkov@usergate.com>,
	Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Anna Schumaker <anna@kernel.org>,
	Chuck Lever <chuck.lever@oracle.com>,  Neil Brown <neilb@suse.de>,
	Olga Kornievskaia <kolga@netapp.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
	 linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org
Subject: Re: [PATCH] sunrpc: removed redundant procp check
Date: Wed, 27 Mar 2024 06:09:09 -0400	[thread overview]
Message-ID: <4630a0ec293ba44672e8c8fbe046794b8688e60c.camel@kernel.org> (raw)
In-Reply-To: <20240327071044.365284-1-aaprelkov@usergate.com>

On Wed, 2024-03-27 at 14:10 +0700, Aleksandr Aprelkov wrote:
> 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: 8e5b67731d08 ("SUNRPC: Add a callback to initialise server requests")
> Signed-off-by: Aleksandr Aprelkov <aaprelkov@usergate.com>
> ---
>  net/sunrpc/svc.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
> index b33e429336fb..2b4b1276d4e8 100644
> --- a/net/sunrpc/svc.c
> +++ b/net/sunrpc/svc.c
> @@ -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);

This should probably go in via Chuck's tree.

Reviewed-by: Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2024-03-27 10:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27  7:10 [PATCH] sunrpc: removed redundant procp check Aleksandr Aprelkov
2024-03-27 10:09 ` Jeff Layton [this message]
2024-03-27 14:10 ` Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4630a0ec293ba44672e8c8fbe046794b8688e60c.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=aaprelkov@usergate.com \
    --cc=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kolga@netapp.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=neilb@suse.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tom@talpey.com \
    --cc=trond.myklebust@hammerspace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox