From: Aleksandr Aprelkov <aaprelkov@usergate.com>
To: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Aleksandr Aprelkov <aaprelkov@usergate.com>,Anna Schumaker
<anna@kernel.org>,Chuck Lever <chuck.lever@oracle.com>,Jeff
Layton <jlayton@kernel.org>,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: [PATCH] sunrpc: removed redundant procp check
Date: Wed, 27 Mar 2024 14:10:44 +0700 [thread overview]
Message-ID: <20240327071044.365284-1-aaprelkov@usergate.com> (raw)
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);
--
2.34.1
next reply other threads:[~2024-03-27 7:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 7:10 Aleksandr Aprelkov [this message]
2024-03-27 10:09 ` [PATCH] sunrpc: removed redundant procp check Jeff Layton
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=20240327071044.365284-1-aaprelkov@usergate.com \
--to=aaprelkov@usergate.com \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jlayton@kernel.org \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).