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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 May 2011 20:33:26 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	jan.kratochvil@...hat.com, vda.linux@...glemail.com,
	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org, indan@....nu
Subject: Re: [PATCH 09/11] job control: reorganize wait_task_stopped()

On 05/12, Tejun Heo wrote:
>
>   int main(int argc, char **argv)
>   {
> 	  pid_t child, control;
>
> 	  child = fork();
> 	  if (!child)
> 		  while (1)
> 			  pause();
>
> 	  kill(child, SIGSTOP);
> 	  waitid(P_PID, child, NULL, WSTOPPED | WNOWAIT);
>
> 	  control = fork();
> 	  if (!control) {
> 		  while (1) {
> 			  kill(child, SIGCONT);
> 			  nanosleep(&ts1ms, NULL);
> 			  kill(child, SIGSTOP);
> 			  nanosleep(&ts1ms, NULL);

Damn, you are right, I think.

At first glance, do_wait() does

	wait_task_stopped();
	wait_task_continued();

and the state can be changed CONTINIUED -> STOPPED in between, right?
Or something else?

Thanks, for the explanation.

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