Re: [PATCH RFC 22/31] net: Add network namespace clone support.

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

 



Daniel Lezcano <dlezcano@xxxxxxxxxx> writes:


>> +
>> +	mutex_lock(&net_mutex);
>> +	err = setup_net(new_net);
>> +	if (err)
>> +		goto out_unlock;
>>
> Should we "net_free" in case of error ?

Oops.  Yes we should.
Thanks.

>> +	net_lock();
>> +	net_list_append(new_net);
>> +	net_unlock();
>> +
>> +	tsk->nsproxy->net_ns = new_net;
>> +
>> +out_unlock:
>> +	mutex_unlock(&net_mutex);
	net_free(new_net);
>> +out:
>> +	put_net(old_net);
>> +	return err;
>> +}
>> +
>>

Eric
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxx
https://lists.osdl.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