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

ebiederm at xmission.com ebiederm at xmission.com
Wed Feb 28 07:05:13 PST 2007


Daniel Lezcano <dlezcano at fr.ibm.com> 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




More information about the general mailing list