NFSD: Fix NFSv4's PUTPUBFH operation
Subsystems (2)
[email protected]
maintainerPATCH 1/1 NFSD: Fix NFSv4's PUTPUBFH operation
From: Chuck Lever <[email protected]>
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.
--- fs/nfsd/nfs4xdr.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
fs/nfsd/nfs4xdr.c +1 -9
@@ -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,
Signature · 1 line
2.45.2
Could this bugfix please be added to the Linux 6.6 LTS branch too?
Ced
Quoted 52 lines · On Sun, 11 Aug 2024 at 19:26, <[email protected]> wrote:
From: Chuck Lever <[email protected]>
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_noopshould really be callednfsd4_decode_void).PUTPUBFH should now behave just like PUTROOTFH.
Reported-by Cedric Blancher <[email protected]>Fixes e1a90ebd8b23 ("NFSD: Combine decode operations for v4 and v4.1")Cc Dan Shelton <[email protected]>Cc Roland Mainz <[email protected]>Signed-off-by Chuck Lever <[email protected]>--- fs/nfsd/nfs4xdr.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)fs/nfsd/nfs4xdr.c +1
-10@@ -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, --2.45.2
Signature · 3 lines
Cedric Blancher <[email protected]> [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur
Quoted 5 lines · Cedric Blancher
Could this bugfix please be added to the Linux 6.6 LTS branch too?
Once I submit the pull request for v6.12, the stable folks should see this patch has a Fixes: tag and pull it into all the LTS trees.
I'll try to remember to check on it once the v6.12 merge window closes.
Quoted 47 lines
Ced
Quoted 44 lines · On Sun, 11 Aug 2024 at 19:26, <[email protected]> wrote:
From: Chuck Lever <[email protected]>
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_noopshould really be callednfsd4_decode_void).PUTPUBFH should now behave just like PUTROOTFH.
Reported-by Cedric Blancher <[email protected]>Fixes e1a90ebd8b23 ("NFSD: Combine decode operations for v4 and v4.1")Cc Dan Shelton <[email protected]>Cc Roland Mainz <[email protected]>Signed-off-by Chuck Lever <[email protected]>---
fs/nfsd/nfs4xdr.c| 10 +---------1 file changed, 1 insertion(+), 9 deletions(-)fs/nfsd/nfs4xdr.c +0
-8@@ -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
__be32nfsd4_decode_read(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u){fs/nfsd/nfs4xdr.c +0
-0@@ -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,
Quoted 14 lines
Quoted 8 lines
fs/nfsd/nfs4xdr.c +1
-2- [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, --2.45.2
Signature · 3 lines
Cedric Blancher <[email protected]> [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur
--
Chuck Lever