All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namjae Jeon <namjae.jeon@samsung.com>
To: kbuild-all@lists.01.org
Subject: Re: [linux-next:master 3666/7588] fs/cifsd/smb_common.c:613:7: error: implicit declaration of function 'groups_alloc'; did you mean 'cgroup_sk_alloc'?
Date: Tue, 30 Mar 2021 10:39:02 +0900	[thread overview]
Message-ID: <038101d72505$76593160$630b9420$@samsung.com> (raw)
In-Reply-To: <202103261809.Oz9hZ7CZ-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 6248 bytes --]

> 
> Hi Namjae,
Hi,

> 
> First bad commit (maybe != root cause):
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   931294922e65a23e1aad6398b9ae02df74044679
> commit: 001c10aa51b4deb76eb074442ad1eac6df042f97 [3666/7588] cifsd: add Kconfig and Makefile
> config: m68k-randconfig-r024-20210326 (attached as .config)
> compiler: m68k-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://protect2.fireeye.com/v1/url?k=7cd734be-234c0df1-7cd6bff1-0cc47a30d446-
> 6953035eb0a4be06&q=1&e=47f24740-e7a2-4216-818b-
> e956bff95745&u=https%3A%2F%2Fraw.githubusercontent.com%2Fintel%2Flkp-
> tests%2Fmaster%2Fsbin%2Fmake.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=001c10aa51b4deb76eb074442ad1eac6df042f97
>         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 001c10aa51b4deb76eb074442ad1eac6df042f97
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
Thanks for your report!
Will fix it:)

Thanks!
> 
> All errors (new ones prefixed by >>):
> 
>    fs/cifsd/smb_common.c: In function 'ksmbd_override_fsids':
> >> fs/cifsd/smb_common.c:613:7: error: implicit declaration of function
> >> 'groups_alloc'; did you mean 'cgroup_sk_alloc'?
> >> [-Werror=implicit-function-declaration]
>      613 |  gi = groups_alloc(0);
>          |       ^~~~~~~~~~~~
>          |       cgroup_sk_alloc
>    fs/cifsd/smb_common.c:613:5: warning: assignment to 'struct group_info *' from 'int' makes pointer
> from integer without a cast [-Wint-conversion]
>      613 |  gi = groups_alloc(0);
>          |     ^
> >> fs/cifsd/smb_common.c:618:2: error: implicit declaration of function
> >> 'set_groups'; did you mean 'get_cgroup_ns'?
> >> [-Werror=implicit-function-declaration]
>      618 |  set_groups(cred, gi);
>          |  ^~~~~~~~~~
>          |  get_cgroup_ns
>    cc1: some warnings being treated as errors
> 
> Kconfig warnings: (for reference only)
>    WARNING: unmet direct dependencies detected for CRYPTO_ARC4
>    Depends on CRYPTO && CRYPTO_USER_API_ENABLE_OBSOLETE
>    Selected by
>    - SMB_SERVER && NETWORK_FILESYSTEMS && INET
> 
> 
> vim +613 fs/cifsd/smb_common.c
> 
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  589 788b6f45c1d2ee Namjae Jeon 2021-03-16  590  int
> ksmbd_override_fsids(struct ksmbd_work *work) 788b6f45c1d2ee Namjae Jeon 2021-03-16  591  {
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  592  	struct ksmbd_session *sess = work->sess;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  593  	struct ksmbd_share_config *share = work->tcon-
> >share_conf;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  594  	struct cred *cred;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  595  	struct group_info *gi;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  596  	unsigned int uid;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  597  	unsigned int gid;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  598
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  599  	uid = user_uid(sess->user);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  600  	gid = user_gid(sess->user);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  601  	if (share->force_uid != KSMBD_SHARE_INVALID_UID)
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  602  		uid = share->force_uid;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  603  	if (share->force_gid != KSMBD_SHARE_INVALID_GID)
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  604  		gid = share->force_gid;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  605
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  606  	cred = prepare_kernel_cred(NULL);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  607  	if (!cred)
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  608  		return -ENOMEM;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  609
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  610  	cred->fsuid = make_kuid(current_user_ns(), uid);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  611  	cred->fsgid = make_kgid(current_user_ns(), gid);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  612
> 788b6f45c1d2ee Namjae Jeon 2021-03-16 @613  	gi = groups_alloc(0);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  614  	if (!gi) {
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  615  		abort_creds(cred);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  616  		return -ENOMEM;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  617  	}
> 788b6f45c1d2ee Namjae Jeon 2021-03-16 @618  	set_groups(cred, gi);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  619  	put_group_info(gi);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  620
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  621  	if (!uid_eq(cred->fsuid, GLOBAL_ROOT_UID))
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  622  		cred->cap_effective = cap_drop_fs_set(cred-
> >cap_effective);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  623
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  624  	WARN_ON(work->saved_cred != NULL);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  625  	work->saved_cred = override_creds(cred);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  626  	if (!work->saved_cred) {
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  627  		abort_creds(cred);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  628  		return -EINVAL;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  629  	}
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  630  	return 0;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  631  } 788b6f45c1d2ee Namjae Jeon 2021-03-16  632
> 
> :::::: The code at line 613 was first introduced by commit
> :::::: 788b6f45c1d2eef909c296d775196bc6ec7dd63a cifsd: add server-side procedures for SMB3
> 
> :::::: TO: Namjae Jeon <namjae.jeon@samsung.com>
> :::::: CC: Namjae Jeon <namjae.jeon@samsung.com>
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation https://protect2.fireeye.com/v1/url?k=7993f9c1-
> 2608c08e-7992728e-0cc47a30d446-296faa3641d1eba2&q=1&e=47f24740-e7a2-4216-818b-
> e956bff95745&u=https%3A%2F%2Flists.01.org%2Fhyperkitty%2Flist%2Fkbuild-all%40lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: "Namjae Jeon" <namjae.jeon@samsung.com>
To: "'kernel test robot'" <lkp@intel.com>
Cc: <kbuild-all@lists.01.org>,
	"'Linux Memory Management List'" <linux-mm@kvack.org>,
	"'Sergey Senozhatsky'" <sergey.senozhatsky@gmail.com>,
	"'Hyunchul Lee'" <hyc.lee@gmail.com>,
	"'Steve French'" <stfrench@microsoft.com>
Subject: RE: [linux-next:master 3666/7588] fs/cifsd/smb_common.c:613:7: error: implicit declaration of function 'groups_alloc'; did you mean 'cgroup_sk_alloc'?
Date: Tue, 30 Mar 2021 10:39:02 +0900	[thread overview]
Message-ID: <038101d72505$76593160$630b9420$@samsung.com> (raw)
In-Reply-To: <202103261809.Oz9hZ7CZ-lkp@intel.com>

> 
> Hi Namjae,
Hi,

> 
> First bad commit (maybe != root cause):
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   931294922e65a23e1aad6398b9ae02df74044679
> commit: 001c10aa51b4deb76eb074442ad1eac6df042f97 [3666/7588] cifsd: add Kconfig and Makefile
> config: m68k-randconfig-r024-20210326 (attached as .config)
> compiler: m68k-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://protect2.fireeye.com/v1/url?k=7cd734be-234c0df1-7cd6bff1-0cc47a30d446-
> 6953035eb0a4be06&q=1&e=47f24740-e7a2-4216-818b-
> e956bff95745&u=https%3A%2F%2Fraw.githubusercontent.com%2Fintel%2Flkp-
> tests%2Fmaster%2Fsbin%2Fmake.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=001c10aa51b4deb76eb074442ad1eac6df042f97
>         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 001c10aa51b4deb76eb074442ad1eac6df042f97
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
Thanks for your report!
Will fix it:)

Thanks!
> 
> All errors (new ones prefixed by >>):
> 
>    fs/cifsd/smb_common.c: In function 'ksmbd_override_fsids':
> >> fs/cifsd/smb_common.c:613:7: error: implicit declaration of function
> >> 'groups_alloc'; did you mean 'cgroup_sk_alloc'?
> >> [-Werror=implicit-function-declaration]
>      613 |  gi = groups_alloc(0);
>          |       ^~~~~~~~~~~~
>          |       cgroup_sk_alloc
>    fs/cifsd/smb_common.c:613:5: warning: assignment to 'struct group_info *' from 'int' makes pointer
> from integer without a cast [-Wint-conversion]
>      613 |  gi = groups_alloc(0);
>          |     ^
> >> fs/cifsd/smb_common.c:618:2: error: implicit declaration of function
> >> 'set_groups'; did you mean 'get_cgroup_ns'?
> >> [-Werror=implicit-function-declaration]
>      618 |  set_groups(cred, gi);
>          |  ^~~~~~~~~~
>          |  get_cgroup_ns
>    cc1: some warnings being treated as errors
> 
> Kconfig warnings: (for reference only)
>    WARNING: unmet direct dependencies detected for CRYPTO_ARC4
>    Depends on CRYPTO && CRYPTO_USER_API_ENABLE_OBSOLETE
>    Selected by
>    - SMB_SERVER && NETWORK_FILESYSTEMS && INET
> 
> 
> vim +613 fs/cifsd/smb_common.c
> 
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  589 788b6f45c1d2ee Namjae Jeon 2021-03-16  590  int
> ksmbd_override_fsids(struct ksmbd_work *work) 788b6f45c1d2ee Namjae Jeon 2021-03-16  591  {
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  592  	struct ksmbd_session *sess = work->sess;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  593  	struct ksmbd_share_config *share = work->tcon-
> >share_conf;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  594  	struct cred *cred;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  595  	struct group_info *gi;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  596  	unsigned int uid;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  597  	unsigned int gid;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  598
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  599  	uid = user_uid(sess->user);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  600  	gid = user_gid(sess->user);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  601  	if (share->force_uid != KSMBD_SHARE_INVALID_UID)
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  602  		uid = share->force_uid;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  603  	if (share->force_gid != KSMBD_SHARE_INVALID_GID)
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  604  		gid = share->force_gid;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  605
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  606  	cred = prepare_kernel_cred(NULL);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  607  	if (!cred)
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  608  		return -ENOMEM;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  609
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  610  	cred->fsuid = make_kuid(current_user_ns(), uid);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  611  	cred->fsgid = make_kgid(current_user_ns(), gid);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  612
> 788b6f45c1d2ee Namjae Jeon 2021-03-16 @613  	gi = groups_alloc(0);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  614  	if (!gi) {
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  615  		abort_creds(cred);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  616  		return -ENOMEM;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  617  	}
> 788b6f45c1d2ee Namjae Jeon 2021-03-16 @618  	set_groups(cred, gi);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  619  	put_group_info(gi);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  620
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  621  	if (!uid_eq(cred->fsuid, GLOBAL_ROOT_UID))
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  622  		cred->cap_effective = cap_drop_fs_set(cred-
> >cap_effective);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  623
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  624  	WARN_ON(work->saved_cred != NULL);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  625  	work->saved_cred = override_creds(cred);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  626  	if (!work->saved_cred) {
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  627  		abort_creds(cred);
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  628  		return -EINVAL;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  629  	}
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  630  	return 0;
> 788b6f45c1d2ee Namjae Jeon 2021-03-16  631  } 788b6f45c1d2ee Namjae Jeon 2021-03-16  632
> 
> :::::: The code at line 613 was first introduced by commit
> :::::: 788b6f45c1d2eef909c296d775196bc6ec7dd63a cifsd: add server-side procedures for SMB3
> 
> :::::: TO: Namjae Jeon <namjae.jeon@samsung.com>
> :::::: CC: Namjae Jeon <namjae.jeon@samsung.com>
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation https://protect2.fireeye.com/v1/url?k=7993f9c1-
> 2608c08e-7992728e-0cc47a30d446-296faa3641d1eba2&q=1&e=47f24740-e7a2-4216-818b-
> e956bff95745&u=https%3A%2F%2Flists.01.org%2Fhyperkitty%2Flist%2Fkbuild-all%40lists.01.org



  reply	other threads:[~2021-03-30  1:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 10:28 [linux-next:master 3666/7588] fs/cifsd/smb_common.c:613:7: error: implicit declaration of function 'groups_alloc'; did you mean 'cgroup_sk_alloc'? kernel test robot
2021-03-26 10:28 ` kernel test robot
2021-03-30  1:39 ` Namjae Jeon [this message]
2021-03-30  1:39   ` Namjae Jeon

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='038101d72505$76593160$630b9420$@samsung.com' \
    --to=namjae.jeon@samsung.com \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.