Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10855885rwl; Mon, 2 Jan 2023 09:13:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXt7Tfbj3SVBDoU8AVrovnzjNc13sAS5y+4BOD0gMWJtsZDgk7Cg5uxAEci20b5t447rTHQM X-Received: by 2002:a50:d616:0:b0:47c:6ed2:43d1 with SMTP id x22-20020a50d616000000b0047c6ed243d1mr38065946edi.30.1672679617074; Mon, 02 Jan 2023 09:13:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672679617; cv=none; d=google.com; s=arc-20160816; b=fyGG+rYNIhur7K3fznwHF2cWIBaFlr5Do69uUQ6/ptipkENSDjsoi9g9zFGdhqv59R Z8Tpq+vd1wq6jabYFPe/hT6aPkW/rYPZWJbPKrCqJxPo5XsrVrtldG6vr1NEBGGV6OrR fhP6H4Wvi1orBTQgIg+pYKD8zVbRuYcuoeR74OBuMldID3i0u8UXpWRZiKhj2YgdHQvx n3cWc9C7y1olJe8toxLLuaD08IpiVIX7ZiNWnMdHKhMGYqfZwgj3pg8GYW/e6OjgAP8x /seXEh90OqJ955H593BEuvVcolQw0jCxk5SwiIZPkoRVCrim36Xl7oBPNrW4qb9pROZM ewNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:to:from:subject :dkim-signature; bh=oa6oI+IogpfyUpRIpVFPR1qQidT7+osjpAqz93V6zNQ=; b=vDmeFbtqao6GZHO49ui2JHUnuJrsJ26MblZpaMApDez4xhfmPz2YbL4y7qqatypLJd gDQ1mOnXaxs6P4uDPCK5M3E+4n79nSiBYsBLl8dxXj1ldwytqsOk8ovQgJQZuomLGgCH HpC60IAv/+srKTx1s9yE3YC+fEmPIVV7YCChw5TnyRewsgINGHbUMGichMtz49L2fUMx U1WLxnclqPC04YzgUmvdJN2j/Y3H8gdV2Hb8T4HrRkeBT8p4VCjeUe6OpQySz7j153cQ eLgZicetODQ1FRjCy5sOCp9iaMH8EKIKtNTcKDTf9tB8dOXsfKJlnrnHVkZyzxJ6pwYk Ybng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hfzpor84; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020a056402084d00b0046afb32bfd9si10013684edz.302.2023.01.02.09.13.13; Mon, 02 Jan 2023 09:13:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hfzpor84; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236324AbjABRG3 (ORCPT + 99 others); Mon, 2 Jan 2023 12:06:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236303AbjABRG1 (ORCPT ); Mon, 2 Jan 2023 12:06:27 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F346BC0D for ; Mon, 2 Jan 2023 09:06:26 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BF7FFB80D0A for ; Mon, 2 Jan 2023 17:06:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56946C433EF for ; Mon, 2 Jan 2023 17:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672679183; bh=4I6/LBKefzd86tix22TnthzStWhxiIrUvURUVo3jCqM=; h=Subject:From:To:Date:In-Reply-To:References:From; b=Hfzpor84qj00pNe6wItEQ1EVR+JY81XfB9SMtXvwZDoRT892hoXobx6csPppZrx0M py3MNCAii8dHLMGWpLzL2GZ4UWdLdvxWovOk2KnUZrS9Y1UxCTgvVAhKtfa09wrB+h OYEMenqC0QIKRW3YC9MotPVDMBX6tSExdU4AddX2/22v/WAJgStufVt4moYltLYmcr dxAZM4rRkAqPTGyuudhNQV/nuRzbldK4YnBW/rWlDkBEZ6KOwYlWjfBFWQ0OvGGNzs UXbMTG8TZzJK2wDWKe8TEAxxG3+VOW09ICmF320u59IUerPZcV3iULZyfrBEkKgHsP uXNiwcUx4OepQ== Subject: [PATCH v1 09/25] SUNRPC: Remove gss_read_common_verf() From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Mon, 02 Jan 2023 12:06:22 -0500 Message-ID: <167267918226.112521.11833238713971258862.stgit@manet.1015granger.net> In-Reply-To: <167267753484.112521.4826748148788735127.stgit@manet.1015granger.net> References: <167267753484.112521.4826748148788735127.stgit@manet.1015granger.net> User-Agent: StGit/1.5.dev2+g9ce680a5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Chuck Lever gss_read_common_verf() is now just a wrapper for dup_netobj(), thus it can be replaced with direct calls to dup_netobj(). Signed-off-by: Chuck Lever --- net/sunrpc/auth_gss/svcauth_gss.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index ba32c05f0258..5da4a3d48a7d 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -1090,18 +1090,6 @@ gss_write_init_verf(struct cache_detail *cd, struct svc_rqst *rqstp, return rc; } -static inline int -gss_read_common_verf(struct rpc_gss_wire_cred *gc, - struct kvec *argv, __be32 *authp, - struct xdr_netobj *in_handle) -{ - if (dup_netobj(in_handle, &gc->gc_ctx)) - return SVC_CLOSE; - *authp = rpc_autherr_badverf; - - return 0; -} - static inline int gss_read_verf(struct rpc_gss_wire_cred *gc, struct kvec *argv, __be32 *authp, @@ -1109,12 +1097,9 @@ gss_read_verf(struct rpc_gss_wire_cred *gc, struct xdr_netobj *in_token) { struct xdr_netobj tmpobj; - int res; - - res = gss_read_common_verf(gc, argv, authp, in_handle); - if (res) - return res; + if (dup_netobj(in_handle, &gc->gc_ctx)) + return SVC_CLOSE; if (svc_safe_getnetobj(argv, &tmpobj)) { kfree(in_handle->data); return SVC_DENIED; @@ -1151,12 +1136,11 @@ static int gss_read_proxy_verf(struct svc_rqst *rqstp, { struct kvec *argv = &rqstp->rq_arg.head[0]; unsigned int length, pgto_offs, pgfrom_offs; - int pages, i, res, pgto, pgfrom; size_t inlen, to_offs, from_offs; + int pages, i, pgto, pgfrom; - res = gss_read_common_verf(gc, argv, &rqstp->rq_auth_stat, in_handle); - if (res) - return res; + if (dup_netobj(in_handle, &gc->gc_ctx)) + return SVC_CLOSE; inlen = svc_getnl(argv); if (inlen > (argv->iov_len + rqstp->rq_arg.page_len)) {