Re: [PATCH] net: cgroup: fix access the unallocated memory in netprio cgroup

2012-07-10 Thread Gao feng
于 2012年07月10日 17:15, Eric Dumazet 写道: > On Tue, 2012-07-10 at 16:53 +0800, Gao feng wrote: >>> Hi Gao >>> >>> Is it still needed to call update_netdev_tables() from write_priomap() ? >>> >> >> Yes, I think it's needed,because read_priomap will show all of the net >> devices, >> >> But we may add

Re: [PATCH] net: cgroup: fix access the unallocated memory in netprio cgroup

2012-07-10 Thread Eric Dumazet
On Tue, 2012-07-10 at 16:53 +0800, Gao feng wrote: > > Hi Gao > > > > Is it still needed to call update_netdev_tables() from write_priomap() ? > > > > Yes, I think it's needed,because read_priomap will show all of the net > devices, > > But we may add the netdev after create a netprio cgroup,

Re: [PATCH] net: cgroup: fix access the unallocated memory in netprio cgroup

2012-07-10 Thread Gao feng
> Hi Gao > > Is it still needed to call update_netdev_tables() from write_priomap() ? > Yes, I think it's needed,because read_priomap will show all of the net devices, But we may add the netdev after create a netprio cgroup, so the new added netdev's priomap will not be allocated. if we

Re: [PATCH] net: cgroup: fix access the unallocated memory in netprio cgroup

2012-07-10 Thread Gao feng
Hi Gao Is it still needed to call update_netdev_tables() from write_priomap() ? Yes, I think it's needed,because read_priomap will show all of the net devices, But we may add the netdev after create a netprio cgroup, so the new added netdev's priomap will not be allocated. if we don't

Re: [PATCH] net: cgroup: fix access the unallocated memory in netprio cgroup

2012-07-10 Thread Eric Dumazet
On Tue, 2012-07-10 at 16:53 +0800, Gao feng wrote: Hi Gao Is it still needed to call update_netdev_tables() from write_priomap() ? Yes, I think it's needed,because read_priomap will show all of the net devices, But we may add the netdev after create a netprio cgroup, so the new

Re: [PATCH] net: cgroup: fix access the unallocated memory in netprio cgroup

2012-07-10 Thread Gao feng
于 2012年07月10日 17:15, Eric Dumazet 写道: On Tue, 2012-07-10 at 16:53 +0800, Gao feng wrote: Hi Gao Is it still needed to call update_netdev_tables() from write_priomap() ? Yes, I think it's needed,because read_priomap will show all of the net devices, But we may add the netdev after create

Re: [PATCH] net: cgroup: fix access the unallocated memory in netprio cgroup

2012-07-09 Thread Eric Dumazet
On Tue, 2012-07-10 at 10:31 +0800, Gao feng wrote: > there are some out of bound accesses in netprio cgroup. > when creating a new netprio cgroup,we only set a prioidx for > the new cgroup,without allocate memory for dev->priomap. > > because we don't want to see additional bound checkings in >

[PATCH] net: cgroup: fix access the unallocated memory in netprio cgroup

2012-07-09 Thread Gao feng
there are some out of bound accesses in netprio cgroup. when creating a new netprio cgroup,we only set a prioidx for the new cgroup,without allocate memory for dev->priomap. because we don't want to see additional bound checkings in fast path, so I think the best way is to allocate memory when we

[PATCH] net: cgroup: fix access the unallocated memory in netprio cgroup

2012-07-09 Thread Gao feng
there are some out of bound accesses in netprio cgroup. when creating a new netprio cgroup,we only set a prioidx for the new cgroup,without allocate memory for dev-priomap. because we don't want to see additional bound checkings in fast path, so I think the best way is to allocate memory when we

Re: [PATCH] net: cgroup: fix access the unallocated memory in netprio cgroup

2012-07-09 Thread Eric Dumazet
On Tue, 2012-07-10 at 10:31 +0800, Gao feng wrote: there are some out of bound accesses in netprio cgroup. when creating a new netprio cgroup,we only set a prioidx for the new cgroup,without allocate memory for dev-priomap. because we don't want to see additional bound checkings in fast