[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NGROUPS 2.6.2rc2


* Tim Hockin (thockin _at_ sun.com) wrote:
> +/* validate and set current->group_info */
> +int set_current_groups(struct group_info *info)
> +{
> +	int retval;
> +	struct group_info *old_info;
> +
> +	retval = security_task_setgroups(info);
> +	if (retval)
> +		return retval;
> +
> +	groups_sort(info);
> +	old_info = current->group_info;
> +	current->group_info = info;
> +	put_group_info(old_info);
> +
> +	return 0;
> +}
<snip>
> ===== fs/proc/array.c 1.55 vs edited =====
> --- 1.55/fs/proc/array.c	Tue Oct 14 14:00:09 2003
> +++ edited/fs/proc/array.c	Tue Jan 27 12:40:02 2004
> @@ -176,8 +176,8 @@
>  		p->files ? p->files->max_fds : 0);
>  	task_unlock(p);
>  
> -	for (g = 0; g < p->ngroups; g++)
> -		buffer += sprintf(buffer, "%d ", p->groups[g]);
> +	for (g = 0; g < min(p->group_info->ngroups,NGROUPS_SMALL); g++)
> +		buffer += sprintf(buffer, "%d ", GROUP_AT(p->group_info,g));
>  
>  	buffer += sprintf(buffer, "\n");
>  	return buffer;

this seems racy with no get/put?

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」
References: