Re: 2.6.2-rc2-mm2

From: Tim Hockin
Date: Fri Jan 30 2004 - 16:53:38 EST


On Fri, Jan 30, 2004 at 04:16:56PM -0500, John Stoffel wrote:
> Andrew> static long do_setgroups(int gidsetsize, gid_t __user *user_grouplist,
> Andrew> gid_t *kern_grouplist)
> Andrew> {
> Andrew> gid_t groups[NGROUPS];
>
> Call me stupid, but what if we accept the patches to increase the
> number of groups, won't that make this array be huge potentially?
> Shouldn't we instead do a kmalloc() using current->ngroups instead?

One of the things you CAN'T do anymore is an array of NGROUPS. That is why
struct group_info is there. Andrew's suggestion was a sketch, not a patch :)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/