Re: [PATCH] cgroups: fix pid namespace bug, fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux