From: "NeilBrown" <neilb@suse.de>
To: "Chuck Lever III" <chuck.lever@oracle.com>
Cc: "kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
"Linux Memory Management List" <linux-mm@kvack.org>,
"kernel test robot" <lkp@intel.com>,
"Linux NFS Mailing List" <linux-nfs@vger.kernel.org>
Subject: Re: [linux-next:master 13556/14285] ERROR: modpost: "set_posix_acl" [fs/nfsd/nfsd.ko] undefined!
Date: Thu, 04 Aug 2022 09:21:38 +1000 [thread overview]
Message-ID: <165956889874.12283.5007966519219519664@noble.neil.brown.name> (raw)
In-Reply-To: <AED75B2A-D639-422C-A744-CD40E2490E92@oracle.com>
On Wed, 03 Aug 2022, Chuck Lever III wrote:
>
> > On Aug 3, 2022, at 2:55 AM, kernel test robot <lkp@intel.com> wrote:
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: 42d670bda02fdba0f3944c92f545984501e5788d
> > commit: 2743f3e0444f7287161ecf3e464ee2733dde412d [13556/14285] NFSD: add posix ACLs to struct nfsd_attrs
> > config: parisc-defconfig (https://download.01.org/0day-ci/archive/20220803/202208031404.a1NgfSzI-lkp@intel.com/config)
> > compiler: hppa-linux-gcc (GCC) 12.1.0
> > reproduce (this is a W=1 build):
> > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2743f3e0444f7287161ecf3e464ee2733dde412d
> > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > git fetch --no-tags linux-next master
> > git checkout 2743f3e0444f7287161ecf3e464ee2733dde412d
> > # save the config file
> > mkdir build_dir && cp config build_dir/.config
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash
> >
> > If you fix the issue, kindly add following tag where applicable
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>, old ones prefixed by <<):
> >
> >>> ERROR: modpost: "set_posix_acl" [fs/nfsd/nfsd.ko] undefined!
> >
> > --
> > 0-DAY CI Kernel Test Service
> > https://01.org/lkp
>
> Neil, I've reproduced this and confirmed that the following addresses
> the error:
>
> 464 #ifdef CONFIG_FS_POSIX_ACL
> 465 if (attr->na_pacl)
> 466 attr->na_aclerr = set_posix_acl(&init_user_ns,
> 467 inode, ACL_TYPE_ACCESS,
> 468 attr->na_pacl);
> 469 if (!attr->na_aclerr && attr->na_dpacl && S_ISDIR(inode->i_mode))
> 470 attr->na_aclerr = set_posix_acl(&init_user_ns,
> 471 inode, ACL_TYPE_DEFAULT,
> 472 attr->na_dpacl);
> 473 #endif
>
> I can squash this change into ("NFSD: add posix ACLs to struct nfsd_attrs").
Thanks. I would prefer a fix like
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 8a2731d2969d..eeeadd0b2f13 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -455,11 +455,13 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp,
if (attr->label && attr->label->len)
attr->label_failed = security_inode_setsecctx(
dentry, attr->label->data, attr->label->len);
- if (attr->pacl)
+ if (IS_ENABLED(CONFIG_FS_POSIX_ACL) &&
+ attr->pacl)
attr->acl_failed = set_posix_acl(&init_user_ns,
inode, ACL_TYPE_ACCESS,
attr->pacl);
- if (!attr->acl_failed && attr->dpacl && S_ISDIR(inode->i_mode))
+ if (IS_ENABLED(CONFIG_FS_POSIX_ACL) &&
+ !attr->acl_failed && attr->dpacl && S_ISDIR(inode->i_mode))
attr->acl_failed = set_posix_acl(&init_user_ns,
inode, ACL_TYPE_DEFAULT,
attr->dpacl);
as that is consistent with similar usage in fs/ksmbd/ and with section
21 "Conditional Compilation' in coding-style.rst
Thanks,
NeilBrown
>
> --
> Chuck Lever
>
>
>
>
next prev parent reply other threads:[~2022-08-03 23:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-03 6:55 kernel test robot
2022-08-03 13:41 ` Chuck Lever III
2022-08-03 23:21 ` NeilBrown [this message]
2022-08-04 14:35 ` Chuck Lever III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=165956889874.12283.5007966519219519664@noble.neil.brown.name \
--to=neilb@suse.de \
--cc=chuck.lever@oracle.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=lkp@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox