Subject: Re: [Patch net-next] pktgen: use the net namespace of current process instead of init_net

From: [email-masked] (Eric W. Biederman)
Date: Sun, 27 Jan 2013 19:13:45 -0800

Cong Wang <[email-masked]> writes:

> On Sun, 2013-01-27 at 18:48 -0800, Eric W. Biederman wrote:
>> Cong Wang <[email-masked]> writes:
>> 
>> > From: Cong Wang <[email-masked]>
>> >
>> > Use the net namespace of the current process loading
>> > pktgen module.
>> 
>> Why not add proper support for multiple network namespaces?
>> 
>> It looks like the proc files could be created in each network namespace
>> and be controlled from there.
>
> Hmm, I didn't think much about this. You are right... we could probably
> make these proc files per-net.

>> Your patch below looks like it could have some unintended effects
>> if pktgen was loaded automatically or compiled into the kernel.
>> 
>
> In this case, 'current' should be the init process whose net namespace
> is init_net, no?

If it is a kernel thread that decided to load the module.  If it
something else who knows.  To my knowledge there are no guarantees
and I'm not particularly interested in having to worry about current
making sense in a module.

Eric