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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 1 Apr 2008 00:07:58 +0400
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Roland McGrath <roland@...hat.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] do_wait reorganization

On 03/31, Roland McGrath wrote:
>
> I think it should look like this:
> 
>     {
> 	    int ret = eligible_child(type, pid, options, p);
> 	    if (ret <= 0)
> 		    return ret;
> 
> 	    if (p->exit_state == EXIT_DEAD)
> 		    return 0;
> 
> 	    /*
> 	     * We don't reap group leaders with subthreads.
> 	     */
> 	    if (p->exit_state == EXIT_ZOMBIE && !delay_group_leader(p))
> 		    return wait_task_zombie(p, options, infop, stat_addr, ru);
> 
> 	    /*
> 	     * It's stopped or running now, so it might
> 	     * later continue, exit, or stop again.
> 	     */
> 	    *retval = 0;
> 
> 	    if (task_is_stopped_or_traced(p))
> 		    return wait_task_stopped(p, options, infop, stat_addr, ru);
> 
> 	    return wait_task_continued(p, options, infop, stat_addr, ru);
>     }

I think you are right.

(BTW, you moved the "options & WHATEVER" checks into wait_task_xxx(),
 I think this really makes the code more readable and maintainable).

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