* [PATCH]: nfs acl: bugfix, don't use static nfsd_acl_versions[]
@ 2020-01-05 16:38 J. R. Okajima
2020-01-06 16:28 ` J. Bruce Fields
0 siblings, 1 reply; 3+ messages in thread
From: J. R. Okajima @ 2020-01-05 16:38 UTC (permalink / raw)
To: trond.myklebust, bfields; +Cc: linux-fsdevel, linux-nfs
Here is a patch to fix nfs acl.
J. R. Okajima
----------------------------------------
commit 8684b9a7c55e9283e8b21112fbdf19b4d27f36b7
Author: J. R. Okajima <hooanon05g@gmail.com>
Date: Mon Jan 6 01:31:20 2020 +0900
nfs acl: bugfix, don't use static nfsd_acl_versions[]
By the commit for v5.2-rc1,
e333f3bbefe3 2019-04-24 nfsd: Allow containers to set supported nfs versions
the line to copy a value from nfsd_acl_version[] to static
nfsd_acl_versions[] was removed. It is OK, but nfsd_acl_versions[] is
still set to nfsd_acl_program.pg_vers which means pg_vers has NULLs for
its all entires and nfsacl stops working entirely.
I am afraid the removal of static nfsd_acl_versions[] was just
forgotten.
Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 18d94ea984ba..7f938bcb927d 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -94,12 +94,11 @@ static const struct svc_version *nfsd_acl_version[] = {
#define NFSD_ACL_MINVERS 2
#define NFSD_ACL_NRVERS ARRAY_SIZE(nfsd_acl_version)
-static const struct svc_version *nfsd_acl_versions[NFSD_ACL_NRVERS];
static struct svc_program nfsd_acl_program = {
.pg_prog = NFS_ACL_PROGRAM,
.pg_nvers = NFSD_ACL_NRVERS,
- .pg_vers = nfsd_acl_versions,
+ .pg_vers = nfsd_acl_version,
.pg_name = "nfsacl",
.pg_class = "nfsd",
.pg_stats = &nfsd_acl_svcstats,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH]: nfs acl: bugfix, don't use static nfsd_acl_versions[]
2020-01-05 16:38 [PATCH]: nfs acl: bugfix, don't use static nfsd_acl_versions[] J. R. Okajima
@ 2020-01-06 16:28 ` J. Bruce Fields
2020-01-06 16:55 ` J. R. Okajima
0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2020-01-06 16:28 UTC (permalink / raw)
To: J. R. Okajima; +Cc: trond.myklebust, linux-fsdevel, linux-nfs
Thanks, but, see 7c149057d044 "nfsd: restore NFSv3 ACL support", in
5.5-rc1; looks like you and I both stumbled on the identical fix?--b.
On Mon, Jan 06, 2020 at 01:38:02AM +0900, J. R. Okajima wrote:
> Here is a patch to fix nfs acl.
>
> J. R. Okajima
>
> ----------------------------------------
> commit 8684b9a7c55e9283e8b21112fbdf19b4d27f36b7
> Author: J. R. Okajima <hooanon05g@gmail.com>
> Date: Mon Jan 6 01:31:20 2020 +0900
>
> nfs acl: bugfix, don't use static nfsd_acl_versions[]
>
> By the commit for v5.2-rc1,
> e333f3bbefe3 2019-04-24 nfsd: Allow containers to set supported nfs versions
> the line to copy a value from nfsd_acl_version[] to static
> nfsd_acl_versions[] was removed. It is OK, but nfsd_acl_versions[] is
> still set to nfsd_acl_program.pg_vers which means pg_vers has NULLs for
> its all entires and nfsacl stops working entirely.
> I am afraid the removal of static nfsd_acl_versions[] was just
> forgotten.
>
> Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
>
> diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> index 18d94ea984ba..7f938bcb927d 100644
> --- a/fs/nfsd/nfssvc.c
> +++ b/fs/nfsd/nfssvc.c
> @@ -94,12 +94,11 @@ static const struct svc_version *nfsd_acl_version[] = {
>
> #define NFSD_ACL_MINVERS 2
> #define NFSD_ACL_NRVERS ARRAY_SIZE(nfsd_acl_version)
> -static const struct svc_version *nfsd_acl_versions[NFSD_ACL_NRVERS];
>
> static struct svc_program nfsd_acl_program = {
> .pg_prog = NFS_ACL_PROGRAM,
> .pg_nvers = NFSD_ACL_NRVERS,
> - .pg_vers = nfsd_acl_versions,
> + .pg_vers = nfsd_acl_version,
> .pg_name = "nfsacl",
> .pg_class = "nfsd",
> .pg_stats = &nfsd_acl_svcstats,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]: nfs acl: bugfix, don't use static nfsd_acl_versions[]
2020-01-06 16:28 ` J. Bruce Fields
@ 2020-01-06 16:55 ` J. R. Okajima
0 siblings, 0 replies; 3+ messages in thread
From: J. R. Okajima @ 2020-01-06 16:55 UTC (permalink / raw)
To: J. Bruce Fields; +Cc: trond.myklebust, linux-fsdevel, linux-nfs
"J. Bruce Fields":
> Thanks, but, see 7c149057d044 "nfsd: restore NFSv3 ACL support", in
> 5.5-rc1; looks like you and I both stumbled on the identical fix?--b.
Ah, you already fixed. I didn't notice since I am still in v5.4.
Sorry for the noise.
J. R. Okajima
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-06 16:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-05 16:38 [PATCH]: nfs acl: bugfix, don't use static nfsd_acl_versions[] J. R. Okajima
2020-01-06 16:28 ` J. Bruce Fields
2020-01-06 16:55 ` J. R. Okajima
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).