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: <4A4D6F38.8040602@cn.fujitsu.com>
Date:	Fri, 03 Jul 2009 10:38:48 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	"Serge E. Hallyn" <serge@...lyn.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Paul Menage <menage@...gle.com>,
	Linux Containers <containers@...ts.linux-foundation.org>,
	Benjamin Blum <bblum@...gle.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cgroups: fix pid namespace bug, fix

>>  	cp->cgrp = cgrp;
>> -	cp->pid_ns = pid_ns;
>> +	cp->ns = ns;
> 
> Why not just do
> 
> 	cp->ns = get_pid_ns(ns);
> 
> here instead of getting and putting at (1) and (2) ?
> 
> Both are correct, but this way will take a bit more
> work to verify every time someone comes to look at this.
> 
> In fact, (just noticed) yours isn't right, because at (3) you
> will leak the pidns reference.
> 

My bad. :(

I did the quick fix without thinking it more.

And I noticed seemingly the similar bug exists in Benjamin's patch...


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