Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp134393lqe; Wed, 27 Mar 2024 00:41:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnDyqD7KKfULkUucqW2e/JcdbzJFAnElx/cKFpPKdlBQ8/bb30hqNCB0RvMK4YH+s8RfNbmUwXKgrCo/jB+lMJfWwe2/hSz/H99WOMSQ== X-Google-Smtp-Source: AGHT+IER001GZQbriQpbiVUKTGidtjz25tCAjiid9XiWb9vbMYflNM0Nt+SNY+5/XAoLn5F6z4D5 X-Received: by 2002:a17:906:1d52:b0:a47:52d7:60d4 with SMTP id o18-20020a1709061d5200b00a4752d760d4mr315391ejh.57.1711525305326; Wed, 27 Mar 2024 00:41:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711525305; cv=pass; d=google.com; s=arc-20160816; b=etLSoC0fVK/gVhEOZ4ELDE/HxugrvvupHPN2SCfKF/yAU8jMz6RJDvgK7KNQoLZ1n/ d36Vb/1+2/iXWsQVHtdyzqQO/44m/JK8M0wdgcl5qn/RF0grFYTvj2zA4eUZEi1a7wY9 zIO5hZaDa2Cz2oxRiiNiBxreCrHORg2TDHsFww9nFtCGvK60URoA0arXsZb0fdaCjPOk CWnFDikXEq5Mt8FWEfUJ+FGNmz6wSzRd0vL/DskxVCbJkHLXAI0Pv1ZmDrkPd3Tq5WkQ iU+6XdA1emeRkielwKyNIGYUXNQSh0jKA/CJUmi2/JkV9b7HCkgHy+wrnDo473dYLDcL RtEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=KI3R1YIRr44UcT9FMolkBb9Mmj3d74zeEoddq2mGNvs=; fh=2Fw3HEX5kgrOeY3PHJUwb7gPHF1gf1mFcTW/gEor5ac=; b=TLVp7cOZ7r9dPoyd25A58KuF7mNuInrlCaxTY+bq2suTkO7eTyf4WUQGEP0tSKsixw pqsBHfMNpTs/zA9/i3LprPoTGX79ccC5sImNIPRhOHVG/XEjSo6+bMTixdW1PCyu/bQJ TbzFyZGLzhdpfNvyj0TkyKWyO4XG9ibw11bgiJJHMRnaLeSZM2vK+aPNE91cdfVcM5/6 m6TML4lvwZROyvt2+HCXLcvIvY9Oj9mbaZCVVfqoFWD6UemVWwqNvZ0s60VA896xH5U+ f1prqVRllAOQA7gwXfByzc93CbkRrmWZnSM7lckYAD9KKyySn/kIVz3OLXJdQ+m2QYpd ZKdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=usergate.com dmarc=pass fromdomain=usergate.com); spf=pass (google.com: domain of linux-nfs+bounces-2488-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2488-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=usergate.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q24-20020a170906389800b00a467368475fsi4178134ejd.927.2024.03.27.00.41.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 00:41:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2488-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=usergate.com dmarc=pass fromdomain=usergate.com); spf=pass (google.com: domain of linux-nfs+bounces-2488-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2488-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=usergate.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0E8BD1F290F5 for ; Wed, 27 Mar 2024 07:41:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DF5312C1B6; Wed, 27 Mar 2024 07:41:39 +0000 (UTC) X-Original-To: linux-nfs@vger.kernel.org Received: from mx2.usergate.com (mx2.usergate.com [46.229.79.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B7B12C1A2; Wed, 27 Mar 2024 07:41:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.229.79.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711525299; cv=none; b=uRP+NNLYWM9mUnOc0AhK8hRMi3lp1op4ylicnuvWp7w/BEzdPNE51Z6rsvXKUAZaqiXQ6IKLzP+mUZIDE2u7dW/E2xVjiyQWqKqxt+iW3u/4OmebwSNB98Qxaeza1fN7VpIoz9fFYcZqBAjTEm67i2sMRAj3qDFwhuEqbSlACwQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711525299; c=relaxed/simple; bh=WEZbm4Q05nrIoUPa93HT1baOMt9IyxBknCAiOcLJqc4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=tSviREG1O217XV08EvjgjTPV/nILzmrgNtRMU2K6dYsBUmu/syNwWuMp09GRcKb8Rx6EewFh4SGzY9y7NduGzpmcMn1L2KZFihPdDF5V/GD5ZqwQwdbTmFgelWIzzR8g91cTO8wfI4Olb2obxK2rhiAymJiQf1hg8l6flZwRnAQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=usergate.com; spf=pass smtp.mailfrom=usergate.com; arc=none smtp.client-ip=46.229.79.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=usergate.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=usergate.com Received: from mail.usergate.com[192.168.90.36] by mx2.usergate.com with ESMTP id DFB3A364686B451CA267CD06A10D08A9; Wed, 27 Mar 2024 14:11:02 +0700 From: Aleksandr Aprelkov To: Trond Myklebust CC: Aleksandr Aprelkov ,Anna Schumaker ,Chuck Lever ,Jeff Layton ,Neil Brown ,Olga Kornievskaia ,Dai Ngo ,Tom Talpey ,"David S. Miller" ,Eric Dumazet ,Jakub Kicinski ,Paolo Abeni ,,,, Subject: [PATCH] sunrpc: removed redundant procp check Date: Wed, 27 Mar 2024 14:10:44 +0700 Message-ID: <20240327071044.365284-1-aaprelkov@usergate.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: ESLSRV-EXCH-01.esafeline.com (192.168.90.36) To nsk02-mbx01.esafeline.com (10.10.1.35) X-Message-Id: BCE3BE4874C140DD802FC89A20BCC59A X-MailFileId: CE9AECCD9CD84540A70607A1150C868E 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 --- 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