[vfs-idmapping:fs.posix_acl.vfsuid 32/37] fs/xattr.c:585: undefined reference to `posix_acl_from_xattr'

From: kernel test robot
Date: Fri Sep 09 2022 - 11:55:11 EST

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git fs.posix_acl.vfsuid
head: d37e11d9b40fc35810217121aa3205b7975fd4c6
commit: fcb72ace104f57d790022ca5895c44a9379dc0a7 [32/37] xattr: use POSIX ACL api
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220909/202209092359.kTlM7Ca6-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git/commit/?id=fcb72ace104f57d790022ca5895c44a9379dc0a7
git remote add vfs-idmapping https://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git
git fetch --no-tags vfs-idmapping fs.posix_acl.vfsuid
git checkout fcb72ace104f57d790022ca5895c44a9379dc0a7
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

/usr/bin/ld: warning: arch/x86/um/checksum_32.o: missing .note.GNU-stack section implies executable stack
/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
/usr/bin/ld: warning: .tmp_vmlinux.kallsyms1 has a LOAD segment with RWX permissions
/usr/bin/ld: fs/xattr.o: in function `setxattr_convert':
>> fs/xattr.c:585: undefined reference to `posix_acl_from_xattr'
collect2: error: ld returned 1 exit status

vim +585 fs/xattr.c

576 static int setxattr_convert(struct user_namespace *mnt_userns, struct dentry *d,
577 struct xattr_ctx *ctx)
578 {
579 struct posix_acl *acl;
581 if (!ctx->size || !is_posix_acl_xattr(ctx->kname->name))
582 return 0;
584 /* TODO: Don't use GFP_NOFS to allocate POSIX ACLs. */
> 585 acl = posix_acl_from_xattr(current_user_ns(), ctx->kvalue, ctx->size);
586 if (IS_ERR(acl))
587 return PTR_ERR(acl);
589 ctx->acl = acl;
590 return 0;
591 }

0-DAY CI Kernel Test Service