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]
Message-Id: <20081104155455.f0b0e5b1.akpm@linux-foundation.org>
Date:	Tue, 4 Nov 2008 15:54:55 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Zhaolei <zhaolei@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org, Roland McGrath <roland@...hat.com>,
	Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH] fork.c: cleanup for copy_sighand()

On Fri, 31 Oct 2008 16:51:19 +0800
Zhaolei <zhaolei@...fujitsu.com> wrote:

> Check CLONE_SIGHAND only is enough, because combination of CLONE_THREAD and
> CLONE_SIGHAND is already done in copy_process().
> 
> Impact: cleanup, no functionality changed
> 
> Signed-off-by: Zhao Lei <zhaolei@...fujitsu.com>
> ---
>  kernel/fork.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/fork.c b/kernel/fork.c
> index f608356..36a0dac 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -741,7 +741,7 @@ static int copy_sighand(unsigned long clone_flags, struct task_struct *tsk)
>  {
>  	struct sighand_struct *sig;
>  
> -	if (clone_flags & (CLONE_SIGHAND | CLONE_THREAD)) {
> +	if (clone_flags & CLONE_SIGHAND) {
>  		atomic_inc(&current->sighand->count);
>  		return 0;
>  	}

OK, it appears to be correct and might yield a tiny speedup on some
architectures.

But whether this change is desirable from a clarity and maintainability
point of view is unclear to me.  Let's add the cc's..

--
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