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:	Fri, 22 May 2009 17:00:51 +0800
From:	Amerigo Wang <xiyou.wangcong@...il.com>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org,
	torvalds@...ux-foundation.org, xemul@...allels.com,
	orenl@...columbia.edu, serue@...ibm.com, dave@...ux.vnet.ibm.com,
	mingo@...e.hu
Subject: Re: [PATCH 03/38] ipcns 1/4: remove useless get/put while
	CLONE_NEWIPC

On Fri, May 22, 2009 at 08:54:57AM +0400, Alexey Dobriyan wrote:
>copy_ipcs() doesn't actually copy anything. If new ipcns is created, it's
>created from scratch, in this case get/put on old ipcns isn't needed.
>
>Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
>Acked-by: Serge Hallyn <serue@...ibm.com>


Looks good to me!

Reviewed-by: WANG Cong <xiyou.wangcong@...il.com>


>---
> ipc/namespace.c |    6 +-----
> 1 files changed, 1 insertions(+), 5 deletions(-)
>
>diff --git a/ipc/namespace.c b/ipc/namespace.c
>index 4a5e752..a56fc59 100644
>--- a/ipc/namespace.c
>+++ b/ipc/namespace.c
>@@ -50,15 +50,11 @@ struct ipc_namespace *copy_ipcs(unsigned long flags, struct ipc_namespace *ns)
> {
> 	struct ipc_namespace *new_ns;
> 
>-	BUG_ON(!ns);
>-	get_ipc_ns(ns);
>-
> 	if (!(flags & CLONE_NEWIPC))
>-		return ns;
>+		return get_ipc_ns(ns);
> 
> 	new_ns = clone_ipc_ns(ns);
> 
>-	put_ipc_ns(ns);
> 	return new_ns;
> }
> 
>-- 
>1.5.6.5
>
>--
>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/
--
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