From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9DEF41D90C8 for ; Mon, 7 Oct 2024 15:39:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728315546; cv=none; b=eAzc+jKB50ElTKtCm8qSr5Rmw1m+WHzAoitD4QS0604y27jzIEu3Ap+oK0Dw1pVcd9p43QRRptmePKA52JlnrENKd1ogJ+R6oPPOCLdajxss4PUGS0SGpR07fBwF/CLk7Vaz0e/fvnHgg32fRx/1o9QKhiGBBbd45B9LaJxID6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728315546; c=relaxed/simple; bh=eJSS279djYneqZGv622jFybRd5NX/EokyZ2ev+lxg5A=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=rdwkG3/PrkgBdmzbqwBW9tNGighu1VARX5Gh7MIvzRA3r54Tp+QuwE8RAv7EzS5tzLnUmxNusBamgJKJ+GJQdutMK69fOP+rwL8DnnVhdRgO5uEUcfV0JJQWHqR5OqVGqU5/LiDDvXtZdWrxUqQZ+oOi2eByFyeArCNQElt0pqA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Pt368Wmv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Pt368Wmv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1664DC4CEC6; Mon, 7 Oct 2024 15:39:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728315546; bh=eJSS279djYneqZGv622jFybRd5NX/EokyZ2ev+lxg5A=; h=Subject:To:Cc:From:Date:From; b=Pt368WmviCe1KoM4bUXTiFTqN6wM9txqrhq38yH1pe5bLUSove/qT0XxgbZOAst7y kASqigbOUvxDJLvmXhzfwxvQpMViAb+Yxk5VJGueu4XCU9WUfhB1KfAslZeJ72ly3q xiysglITJT8/6X5bSZoG7qVK17QrtY76OSRYCK4g= Subject: FAILED: patch "[PATCH] NFSD: Fix NFSv4's PUTPUBFH operation" failed to apply to 5.4-stable tree To: chuck.lever@oracle.com,cedric.blancher@gmail.com,dan.f.shelton@gmail.com,roland.mainz@nrubsig.org Cc: From: Date: Mon, 07 Oct 2024 17:39:03 +0200 Message-ID: <2024100703-decorated-bodacious-fa3c@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y git checkout FETCH_HEAD git cherry-pick -x 202f39039a11402dcbcd5fece8d9fa6be83f49ae # git commit -s git send-email --to '' --in-reply-to '2024100703-decorated-bodacious-fa3c@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^.. Possible dependencies: 202f39039a11 ("NFSD: Fix NFSv4's PUTPUBFH operation") e78e274eb22d ("NFSD: Avoid clashing function prototypes") eeadcb757945 ("NFSD: Simplify READ_PLUS") 3fdc54646234 ("NFSD: Reduce amount of struct nfsd4_compoundargs that needs clearing") 103cc1fafee4 ("SUNRPC: Parametrize how much of argsize should be zeroed") 1913cdf56cb5 ("NFSD: Replace boolean fields in struct nfsd4_copy") 87689df69491 ("NFSD: Shrink size of struct nfsd4_copy") 09426ef2a64e ("NFSD: Shrink size of struct nfsd4_copy_notify") 99b002a1fa00 ("NFSD: Clean up nfsd4_encode_readlink()") c738b218a2e5 ("NFSD: Clean up SPLICE_OK in nfsd4_encode_read()") 0cb4d23ae08c ("NFSD: Fix the behavior of READ near OFFSET_MAX") 555dbf1a9aac ("nfsd: Replace use of rwsem with errseq_t") f11ad7aa6531 ("NFSD: Fix verifier returned in stable WRITEs") 1e37d0e5bda4 ("NFSD: Fix inconsistent indenting") 474bc334698d ("nfsd: Reduce contention for the nfsd_file nf_rwsem") eac0b17a77fb ("NFSD add vfs_fsync after async copy is done") bddfdbcddbe2 ("NFSD: Extract the svcxdr_init_encode() helper") 1fcbd1c9456b ("NFSD: Update the NFSv2 READLINK argument decoder to use struct xdr_stream") 224c1c894e48 ("NFSD: Update READLINK3arg decoder to use struct xdr_stream") be63bd2ac6bb ("NFSD: Update READ3arg decoder to use struct xdr_stream") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 202f39039a11402dcbcd5fece8d9fa6be83f49ae Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Sun, 11 Aug 2024 13:11:07 -0400 Subject: [PATCH] NFSD: Fix NFSv4's PUTPUBFH operation According to RFC 8881, all minor versions of NFSv4 support PUTPUBFH. Replace the XDR decoder for PUTPUBFH with a "noop" since we no longer want the minorversion check, and PUTPUBFH has no arguments to decode. (Ideally nfsd4_decode_noop should really be called nfsd4_decode_void). PUTPUBFH should now behave just like PUTROOTFH. Reported-by: Cedric Blancher Fixes: e1a90ebd8b23 ("NFSD: Combine decode operations for v4 and v4.1") Cc: Dan Shelton Cc: Roland Mainz Cc: stable@vger.kernel.org Signed-off-by: Chuck Lever diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 4643fcfb7187..f118921250c3 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -1245,14 +1245,6 @@ nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) return nfs_ok; } -static __be32 -nfsd4_decode_putpubfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p) -{ - if (argp->minorversion == 0) - return nfs_ok; - return nfserr_notsupp; -} - static __be32 nfsd4_decode_read(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) { @@ -2374,7 +2366,7 @@ static const nfsd4_dec nfsd4_dec_ops[] = { [OP_OPEN_CONFIRM] = nfsd4_decode_open_confirm, [OP_OPEN_DOWNGRADE] = nfsd4_decode_open_downgrade, [OP_PUTFH] = nfsd4_decode_putfh, - [OP_PUTPUBFH] = nfsd4_decode_putpubfh, + [OP_PUTPUBFH] = nfsd4_decode_noop, [OP_PUTROOTFH] = nfsd4_decode_noop, [OP_READ] = nfsd4_decode_read, [OP_READDIR] = nfsd4_decode_readdir,