linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: Iulia Manda <iulia.manda21@gmail.com>,
	kbuild-all@01.org, Josh Triplett <josh@joshtriplett.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: kernel/uid16.c:184:2: error: implicit declaration of function 'groups_alloc'
Date: Mon, 6 Jul 2015 13:56:01 -0700	[thread overview]
Message-ID: <20150706135601.bd75127ce72297e70a396bd3@linux-foundation.org> (raw)
In-Reply-To: <201507050734.RcWSMvjj%fengguang.wu@intel.com>

On Sun, 5 Jul 2015 07:30:38 +0800 kbuild test robot <fengguang.wu@intel.com> wrote:

> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   5c755fe142b421d295e7dd64a9833c12abbfd28e
> commit: 2813893f8b197a14f1e1ddb04d99bce46817c84a kernel: conditionally support non-root users, groups and capabilities
> date:   3 months ago
> config: openrisc-allnoconfig (attached as .config)
> reproduce:
>   wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>   chmod +x ~/bin/make.cross
>   git checkout 2813893f8b197a14f1e1ddb04d99bce46817c84a
>   # save the attached .config to linux build tree
>   make.cross ARCH=openrisc 
> 
> All error/warnings (new ones prefixed by >>):
> 
>    kernel/uid16.c: In function 'SYSC_setgroups16':
> >> kernel/uid16.c:184:2: error: implicit declaration of function 'groups_alloc'
>    kernel/uid16.c:184:13: warning: assignment makes pointer from integer without a cast


Iulia, does the below look corect?  It will make setgroups16() return
-ENOMEM, which seems inappropriate.

From: Andrew Morton <akpm@linux-foundation.org>
Subject: kernel/uid16.c needs cred.h

openrisc-allnoconfig:

kernel/uid16.c: In function 'SYSC_setgroups16':
kernel/uid16.c:184:2: error: implicit declaration of function 'groups_alloc'
kernel/uid16.c:184:13: warning: assignment makes pointer from integer without a cast

Fixes: 2813893f8b197a1 ("kernel: conditionally support non-root users, groups and capabilities")
Reported-by: Fengguang Wu <fengguang.wu@gmail.com>
Cc: Iulia Manda <iulia.manda21@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/cred.h |    9 +++++++--
 kernel/uid16.c       |    1 +
 2 files changed, 8 insertions(+), 2 deletions(-)

diff -puN kernel/uid16.c~kernel-uid16c-needs-credh kernel/uid16.c
--- a/kernel/uid16.c~kernel-uid16c-needs-credh
+++ a/kernel/uid16.c
@@ -9,6 +9,7 @@
 #include <linux/reboot.h>
 #include <linux/prctl.h>
 #include <linux/capability.h>
+#include <linux/cred.h>
 #include <linux/init.h>
 #include <linux/highuid.h>
 #include <linux/security.h>
diff -puN include/linux/cred.h~kernel-uid16c-needs-credh include/linux/cred.h
--- a/include/linux/cred.h~kernel-uid16c-needs-credh
+++ a/include/linux/cred.h
@@ -64,12 +64,17 @@ do {							\
 
 extern struct group_info init_groups;
 #ifdef CONFIG_MULTIUSER
-extern struct group_info *groups_alloc(int);
-extern void groups_free(struct group_info *);
+extern struct group_info *groups_alloc(int gidsetsize);
+extern void groups_free(struct group_info *group_info);
 
 extern int in_group_p(kgid_t);
 extern int in_egroup_p(kgid_t);
 #else
+extern struct group_info *groups_alloc(int gidsetsize)
+{
+	return NULL;
+}
+
 static inline void groups_free(struct group_info *group_info)
 {
 }
_


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2015-07-06 20:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-04 23:30 kbuild test robot
2015-07-05  0:10 ` Josh Triplett
2015-07-06 20:56 ` Andrew Morton [this message]
2015-07-06 21:47   ` josh
2015-07-06 21:59     ` Andrew Morton
2015-07-06 22:18       ` josh

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=20150706135601.bd75127ce72297e70a396bd3@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=iulia.manda21@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=kbuild-all@01.org \
    --cc=linux-mm@kvack.org \
    --cc=paulmck@linux.vnet.ibm.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