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>] [day] [month] [year] [list]
Message-ID: <20121031143700.GA4094@redhat.com>
Date:	Wed, 31 Oct 2012 15:37:00 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Alan Cox <alan@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: + fork-unshare-remove-dead-code.patch added to -mm tree

> --- a/kernel/fork.c~fork-unshare-remove-dead-code
> +++ a/kernel/fork.c
> @@ -1792,10 +1792,8 @@ SYSCALL_DEFINE1(unshare, unsigned long,
>  			exit_sem(current);
>  		}
>
> -		if (new_nsproxy) {
> +		if (new_nsproxy)
>  			switch_task_namespaces(current, new_nsproxy);
> -			new_nsproxy = NULL;
> -		}
>
>  		task_lock(current);
>
> @@ -1819,9 +1817,6 @@ SYSCALL_DEFINE1(unshare, unsigned long,
>  		task_unlock(current);
>  	}
>
> -	if (new_nsproxy)
> -		put_nsproxy(new_nsproxy);
> -

Agreed.

Perhaps it also makes sense to kill
"if (new_fs || new_fd || do_sysvsem || new_nsproxy)" ? This check
buys nothing. And without this check it is obvious why we do not
need put_nsproxy() after this block.

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