Re: [PATCH 11/40] ipv6/flowlabel: simplify pid namespace lookup

2018-05-17 Thread Eric W. Biederman
Christoph Hellwig writes: > On Thu, May 17, 2018 at 12:28:01AM -0500, Eric W. Biederman wrote: >> > struct pid_namespace *proc_pid_namespace(struct inode *inode) >> > { >> >// maybe warn on for s_magic not on procfs?? >> >return inode->i_sb->s_fs_info; >> > } >> >> That

Re: [PATCH 11/40] ipv6/flowlabel: simplify pid namespace lookup

2018-05-17 Thread Christoph Hellwig
On Thu, May 17, 2018 at 12:28:01AM -0500, Eric W. Biederman wrote: > > struct pid_namespace *proc_pid_namespace(struct inode *inode) > > { > > // maybe warn on for s_magic not on procfs?? > > return inode->i_sb->s_fs_info; > > } > > That should work. Ideally out of line for the proc_fs.h

Re: [PATCH 11/40] ipv6/flowlabel: simplify pid namespace lookup

2018-05-16 Thread Eric W. Biederman
Christoph Hellwig writes: > On Sat, May 05, 2018 at 07:37:33AM -0500, Eric W. Biederman wrote: >> Christoph Hellwig writes: >> >> > The shole seq_file sequence already operates under a single RCU lock pair, >> > so move the pid namespace lookup into it, and stop

Re: [PATCH 11/40] ipv6/flowlabel: simplify pid namespace lookup

2018-05-15 Thread Christoph Hellwig
On Sat, May 05, 2018 at 07:37:33AM -0500, Eric W. Biederman wrote: > Christoph Hellwig writes: > > > The shole seq_file sequence already operates under a single RCU lock pair, > > so move the pid namespace lookup into it, and stop grabbing a reference > > and remove all kinds of

Re: [PATCH 11/40] ipv6/flowlabel: simplify pid namespace lookup

2018-05-05 Thread Eric W. Biederman
Christoph Hellwig writes: > The shole seq_file sequence already operates under a single RCU lock pair, > so move the pid namespace lookup into it, and stop grabbing a reference > and remove all kinds of boilerplate code. This is wrong. Move task_active_pid_ns(current) from open to

[PATCH 11/40] ipv6/flowlabel: simplify pid namespace lookup

2018-04-25 Thread Christoph Hellwig
The shole seq_file sequence already operates under a single RCU lock pair, so move the pid namespace lookup into it, and stop grabbing a reference and remove all kinds of boilerplate code. Signed-off-by: Christoph Hellwig --- net/ipv6/ip6_flowlabel.c | 28