From patchwork Fri Dec 23 16:04:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 9487555 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A4B8E601D3 for ; Fri, 23 Dec 2016 16:06:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9773026E82 for ; Fri, 23 Dec 2016 16:06:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C2CF27829; Fri, 23 Dec 2016 16:06:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCCEC26E82 for ; Fri, 23 Dec 2016 16:06:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760934AbcLWQGd (ORCPT ); Fri, 23 Dec 2016 11:06:33 -0500 Received: from mx143.netapp.com ([216.240.21.24]:63704 "EHLO mx143.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755606AbcLWQGb (ORCPT ); Fri, 23 Dec 2016 11:06:31 -0500 X-IronPort-AV: E=Sophos;i="5.33,393,1477983600"; d="scan'208";a="165484678" Received: from vmwexchts01-prd.hq.netapp.com ([10.122.105.12]) by mx143-out.netapp.com with ESMTP; 23 Dec 2016 08:02:54 -0800 Received: from smtp2.corp.netapp.com (10.57.159.114) by VMWEXCHTS01-PRD.hq.netapp.com (10.122.105.12) with Microsoft SMTP Server id 15.0.1210.3; Fri, 23 Dec 2016 08:06:16 -0800 Received: from rhel7-1ga.androsad.fake (dros-16.local.vpn.netapp.com [10.55.72.69]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id uBNG6EUl024091; Fri, 23 Dec 2016 08:06:16 -0800 (PST) From: To: CC: , , Andy Adamson Subject: [PATCH Version 3 02/16] SUNRPC: add a null call with payload GSSv3 Date: Fri, 23 Dec 2016 11:04:14 -0500 Message-ID: <1482509068-24516-3-git-send-email-andros@netapp.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1482509068-24516-1-git-send-email-andros@netapp.com> References: <1482509068-24516-1-git-send-email-andros@netapp.com> MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andy Adamson RPCSEC_GSS_CREATE and RPCSEC_GSS_LIST are NULL calls with a payload Signed-off-by: Andy Adamson --- include/linux/sunrpc/clnt.h | 3 +++ net/sunrpc/clnt.c | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 85cc819..880537d 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h @@ -175,6 +175,9 @@ int rpc_call_sync(struct rpc_clnt *clnt, const struct rpc_message *msg, int flags); struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int flags); +struct rpc_task *rpc_call_null_payload(struct rpc_clnt *clnt, + struct rpc_cred *cred, int flags, void *argp, + void *resp, struct rpc_procinfo *pinfo); int rpc_restart_call_prepare(struct rpc_task *); int rpc_restart_call(struct rpc_task *); void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 1efbe48..9156c62 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2503,6 +2503,26 @@ static int rpcproc_decode_null(void *rqstp, struct xdr_stream *xdr, void *obj) return 0; } +struct rpc_task * +rpc_call_null_payload(struct rpc_clnt *clnt, struct rpc_cred *cred, int flags, + void *argp, void *resp, struct rpc_procinfo *pinfo) +{ + struct rpc_message msg = { + .rpc_proc = pinfo, + .rpc_argp = argp, + .rpc_resp = resp, + .rpc_cred = cred, + }; + struct rpc_task_setup task_setup_data = { + .rpc_client = clnt, + .rpc_message = &msg, + .callback_ops = &rpc_default_ops, + .flags = flags, + }; + return rpc_run_task(&task_setup_data); +} +EXPORT_SYMBOL_GPL(rpc_call_null_payload); + static struct rpc_procinfo rpcproc_null = { .p_encode = rpcproc_encode_null, .p_decode = rpcproc_decode_null,