Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 6b17072

Browse files
chucklevergregkh
authored andcommitted
NFSD: Fix NFSv4's PUTPUBFH operation
commit 202f390 upstream. 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: e1a90eb ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f7d8ee9 commit 6b17072

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

fs/nfsd/nfs4xdr.c

+1-9
Original file line numberDiff line numberDiff line change
@@ -1245,14 +1245,6 @@ nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
12451245
return nfs_ok;
12461246
}
12471247

1248-
static __be32
1249-
nfsd4_decode_putpubfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p)
1250-
{
1251-
if (argp->minorversion == 0)
1252-
return nfs_ok;
1253-
return nfserr_notsupp;
1254-
}
1255-
12561248
static __be32
12571249
nfsd4_decode_read(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
12581250
{
@@ -2345,7 +2337,7 @@ static const nfsd4_dec nfsd4_dec_ops[] = {
23452337
[OP_OPEN_CONFIRM] = nfsd4_decode_open_confirm,
23462338
[OP_OPEN_DOWNGRADE] = nfsd4_decode_open_downgrade,
23472339
[OP_PUTFH] = nfsd4_decode_putfh,
2348-
[OP_PUTPUBFH] = nfsd4_decode_putpubfh,
2340+
[OP_PUTPUBFH] = nfsd4_decode_noop,
23492341
[OP_PUTROOTFH] = nfsd4_decode_noop,
23502342
[OP_READ] = nfsd4_decode_read,
23512343
[OP_READDIR] = nfsd4_decode_readdir,

0 commit comments

Comments
 (0)