Skip to content

Commit 8013010

Browse files
chuckleveranodos325
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 fa5adb7 commit 8013010

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

fs/nfsd/nfs4xdr.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,14 +1287,6 @@ nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
12871287
return nfs_ok;
12881288
}
12891289

1290-
static __be32
1291-
nfsd4_decode_putpubfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p)
1292-
{
1293-
if (argp->minorversion == 0)
1294-
return nfs_ok;
1295-
return nfserr_notsupp;
1296-
}
1297-
12981290
static __be32
12991291
nfsd4_decode_read(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
13001292
{
@@ -2387,7 +2379,7 @@ static const nfsd4_dec nfsd4_dec_ops[] = {
23872379
[OP_OPEN_CONFIRM] = nfsd4_decode_open_confirm,
23882380
[OP_OPEN_DOWNGRADE] = nfsd4_decode_open_downgrade,
23892381
[OP_PUTFH] = nfsd4_decode_putfh,
2390-
[OP_PUTPUBFH] = nfsd4_decode_putpubfh,
2382+
[OP_PUTPUBFH] = nfsd4_decode_noop,
23912383
[OP_PUTROOTFH] = nfsd4_decode_noop,
23922384
[OP_READ] = nfsd4_decode_read,
23932385
[OP_READDIR] = nfsd4_decode_readdir,

0 commit comments

Comments
 (0)