The patch below does not apply to the 4.19-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 stable@vger.kernel.org.
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-4.19.y git checkout FETCH_HEAD git cherry-pick -x 202f39039a11402dcbcd5fece8d9fa6be83f49ae # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '2024100703-daunting-sternness-a39e@gregkh' --subject-prefix 'PATCH 4.19.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 chuck.lever@oracle.com 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 cedric.blancher@gmail.com Fixes: e1a90ebd8b23 ("NFSD: Combine decode operations for v4 and v4.1") Cc: Dan Shelton dan.f.shelton@gmail.com Cc: Roland Mainz roland.mainz@nrubsig.org Cc: stable@vger.kernel.org Signed-off-by: Chuck Lever chuck.lever@oracle.com
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,
linux-stable-mirror@lists.linaro.org