lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 17 Sep 2007 20:26:27 +0400
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Guillaume Chazarain <guichaz@...oo.fr>
Cc:	akpm@...ux-foundation.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	balbir@...ibm.com, jlan@...r.sgi.com, jlim@....com
Subject: Re: + taskstats-add-all-thread-stats-for-taskstats_cmd_attr_tgid.patch added to -mm tree

On 09/15, Guillaume Chazarain wrote:
>
> Le Thu, 13 Sep 2007 16:41:41 +0400,
> Oleg Nesterov <oleg@...sign.ru> a ??crit :
> 
> > > +	do
> > > +		if (!tsk->exit_state)
> > > +			add_tsk(stats, tsk);
> > > +	while_each_thread(first, tsk);
> > 
> > This reminds me. The "!tsk->exit_state" is not good and racy, it
> > can't prevent the double accounting (of course, I don't blame this
> > patch).
> 
> I documented this in v4, but I was wondering if always setting
> tsk->exit_state under the protection of lock_task_sighand() would fix
> the race.

No, this is not enough. There is a window between do_exit()->taskstats_exit()
and do_exit()->exit_notify() which sets ->exit_state. Probably, we can
shift taskstats_exit() into exit_notify() but this is not good.

Oleg.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ