lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240327071044.365284-1-aaprelkov@usergate.com>
Date: Wed, 27 Mar 2024 14:10:44 +0700
From: Aleksandr Aprelkov <aaprelkov@...rgate.com>
To: Trond Myklebust <trond.myklebust@...merspace.com>
CC: Aleksandr Aprelkov <aaprelkov@...rgate.com>,Anna Schumaker <anna@...nel.org>,Chuck Lever <chuck.lever@...cle.com>,Jeff Layton <jlayton@...nel.org>,Neil Brown <neilb@...e.de>,Olga Kornievskaia <kolga@...app.com>,Dai Ngo <Dai.Ngo@...cle.com>,Tom Talpey <tom@...pey.com>,"David S. Miller" <davem@...emloft.net>,Eric Dumazet <edumazet@...gle.com>,Jakub Kicinski <kuba@...nel.org>,Paolo Abeni <pabeni@...hat.com>,<linux-nfs@...r.kernel.org>,<netdev@...r.kernel.org>,<linux-kernel@...r.kernel.org>,<lvc-project@...uxtesting.org>
Subject: [PATCH] sunrpc: removed redundant procp check

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@...rgate.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ