Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp159198pxu; Tue, 5 Jan 2021 07:34:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9RksrkynL+ZmnVoryafYafz4ex+aeqsFjwJc+VymeGWqh4CCwF8gUlHwOgwBkDEoYnCf4 X-Received: by 2002:a05:6402:1041:: with SMTP id e1mr352614edu.54.1609860877376; Tue, 05 Jan 2021 07:34:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609860877; cv=none; d=google.com; s=arc-20160816; b=LnIhgkGGDjqL37RKayiOfgvSvZZEbjJZxzcjQjREuNgV11OsxeROX7GNnwzl3q00vj 31+77El8huGSpL1Z+Nu1vrf++xccBLDaNgeT0ipA/+IZyPqXdzIiB/UiFDB67AHHJ02K Iysoe1Yrv4O113arnQU5oPbYWxAAt4SSgIeGo+jfLyNzy8n+YX/5oWqmVteE1flbFYmz E6GbGmEp59hnRPkfpguuDbbto0BUowi67ufleJz+8s5AvEiJjCc0G41e1rlngQjmgPFS FWWNE/+lxLEttY3gwOR6zaE6qsJZd2H4pEt8ByiXALVNvh+WjipjgQI7uJJPu3230wiK rcUQ== 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 :sender:dkim-signature; bh=KK5pH2d4/hYCVjeFLoyzSReEdz7WVJMLxtkHihiCNeY=; b=D7sI4ybkv7+z/OnktYLp6+BhTagZfXzLMFnEOHDQvkRX2DGlPu/0A+JmNVXaz+3uVd WjSXRHzGiBPZZ2/P6duUUK8CstOpiP/GIVXWqzonGEp0qoCQo1MGne7TmFsBDaR3dh0r ZkDcCORxDRMHVwELe1xlttdeVKTnvFMGe+TxB6iytyxy3ovN3Pth2A2pX4MtntWY3kZh mcKpol1DWCwk1TzSBHRDjwjo7FnYxFpnq0XElrO7zlyANydIK/FyZGg0uXEQEMjuhhw8 cZr1LIIpHxuxtrnGieZP/xeNsEK5VDNTs4k6y0J4NgPRf3x5mQgjJGdQRmRWvxWj69KY zcOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dHqbEkak; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si35518638eda.107.2021.01.05.07.34.17; Tue, 05 Jan 2021 07:34:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dHqbEkak; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728060AbhAEPdT (ORCPT + 99 others); Tue, 5 Jan 2021 10:33:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727946AbhAEPdS (ORCPT ); Tue, 5 Jan 2021 10:33:18 -0500 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB537C06179A for ; Tue, 5 Jan 2021 07:33:03 -0800 (PST) Received: by mail-qk1-x731.google.com with SMTP id v126so26719051qkd.11 for ; Tue, 05 Jan 2021 07:33:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=KK5pH2d4/hYCVjeFLoyzSReEdz7WVJMLxtkHihiCNeY=; b=dHqbEkaksRDyrnk1LOw8cQHNpD8eR/LKM7frsi/5XlJ2VDyFtrVgaJlnEhQMq/cMRY fUr8kml1ehp0BWqpRFCue5GcW6651QBvkP8cmQiHZxiO40ixzH/2fv+S5sDiG30xw1u/ l6boQncYE/uJcE3M6/OGAR+xrG5S8i568TenGerxI9XYQ6RNZytVee4HSrXCRHtxAMmM Fa5TfwVRhs+KvVpGFtFTLfk6RP3lh5IY1k78TVZ514T8AVc2L3WAeLkEKR2c+gcFuoKP q0m6qPYVGHDzuxiWga+ZM5uZ2+XIHScLChe6ur1qKuydlKMhdZDR+2To5XRAjLgjcWuA m5Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=KK5pH2d4/hYCVjeFLoyzSReEdz7WVJMLxtkHihiCNeY=; b=KWvquvFjKUju/Qwf7ApKtCQ8nToE6/1/zeHtwkG4hvryDn6RN4+RCJI8oWS5x4oOjh FqT13uunTo2CboHjc7WEm4jFbaE59rjY9+xPlucmtMjeOlBGF8E17TROf4GxeED93O/H SURijrxHJN/9xL1vjh7NZrzBjXJ481Hir/GLokvCv7It+lPwYUo653QQunISkKpV9fXa m6xLTeCbOUqRTDq+qGC9s7WWRjcfU01o320Cr0Ge0PYjO5izsganNfEL+R0jP00efBbA Toc3uHP6v0X6FTyI8kRUb81NbJb1fYlz7xbcE/pthO4dZX3NJmF8k3qbiOW39luy9Sn2 mBQw== X-Gm-Message-State: AOAM533A2Ic4XoNWLCj+L9YfYxo060NJrmwZFf4rHXALntC3Tp6Fd9FX Bi1KJDz6qLB8jvXR4YaXdLTMICis45g= X-Received: by 2002:a37:9d14:: with SMTP id g20mr76612qke.260.1609860782707; Tue, 05 Jan 2021 07:33:02 -0800 (PST) Received: from gateway.1015granger.net (c-68-61-232-219.hsd1.mi.comcast.net. [68.61.232.219]) by smtp.gmail.com with ESMTPSA id n62sm131565qkn.125.2021.01.05.07.33.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jan 2021 07:33:02 -0800 (PST) Sender: Chuck Lever Received: from klimt.1015granger.net (klimt.1015granger.net [192.168.1.55]) by gateway.1015granger.net (8.14.7/8.14.7) with ESMTP id 105FX0WC020934 for ; Tue, 5 Jan 2021 15:33:00 GMT Subject: [PATCH v1 38/42] NFSD: Update the NFSv2 ACL ACCESS argument decoder to use struct xdr_stream From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Tue, 05 Jan 2021 10:33:00 -0500 Message-ID: <160986078097.5532.12225653251775677522.stgit@klimt.1015granger.net> In-Reply-To: <160986050640.5532.16498408936966394862.stgit@klimt.1015granger.net> References: <160986050640.5532.16498408936966394862.stgit@klimt.1015granger.net> User-Agent: StGit/0.23-29-ga622f1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Signed-off-by: Chuck Lever --- fs/nfsd/nfs2acl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c index 0274348f6679..7eeac5b81c20 100644 --- a/fs/nfsd/nfs2acl.c +++ b/fs/nfsd/nfs2acl.c @@ -222,14 +222,15 @@ static int nfsaclsvc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p) static int nfsaclsvc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p) { - struct nfsd3_accessargs *argp = rqstp->rq_argp; + struct xdr_stream *xdr = &rqstp->rq_arg_stream; + struct nfsd3_accessargs *args = rqstp->rq_argp; - p = nfs2svc_decode_fh(p, &argp->fh); - if (!p) + if (!svcxdr_decode_fhandle(xdr, &args->fh)) + return 0; + if (xdr_stream_decode_u32(xdr, &args->access) < 0) return 0; - argp->access = ntohl(*p++); - return xdr_argsize_check(rqstp, p); + return 1; } /*