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:	Thu, 27 Feb 2014 20:06:26 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	matt.helsley@...il.com, davem@...emloft.net, guillaume@...infr.org
Subject: Re: + exitc-call-proc_exit_connector-after-exit_state-is-set.patch
	added to -mm tree

On 02/27, Guillaume Morin wrote:
>
> On 27 Feb 17:47, Oleg Nesterov wrote:
>
> > Nevermind. Please consider this trivial example:
> >
> > 	tfunc(void *)
> > 	{
> > 		for (;;)
> > 			pause();
> > 	}
> >
> > 	int main(void)
> > 	{
> > 		pthread_create(tfunc);
> > 		pthread_exit();
> > 	}
> >
> > The main thread can exit and call proc_exit_connector() before
> > register_interest_for_pid(), but WNOHANG obviously can't succeed.
>
> What matters is not the exit message of the main thread but the exit
> message from the last threaded dying.  In your example, it's fine that
> waitpid fails since the process is still around.  If you kill it, the
> connector will get a connector message for the thread you created in
> main().

Yes sure. But how can you know that you should take this sub-thread
into account and this is the last thread?

OK... you can probably look at every PROC_EVENT_EXIT which has the
right ->process_tgid and use wait(WNOHANG) every time to detect the
group exit.

OK, thanks, I seem to understand now. Initially I wrongly thought
that your point is literally "tgid should me reapable right after
PROC_EVENT_EXIT with this patch".

Thanks!

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