#include <linux/user_namespace.h>
#include <linux/vmalloc.h>
#include <linux/uaccess.h>
#ifdef CONFIG_CREDP
#include <asm/iee-cred.h>
#endif

struct group_info *groups_alloc(int gidsetsize)
{
	struct group_info *gi;
	gi = kvmalloc(struct_size(gi, gid, gidsetsize), GFP_KERNEL_ACCOUNT);
	if (!gi)
		return NULL;

	refcount_set(&gi->usage, 1);
	gi->ngroups = gidsetsize;
	return gi;
}
