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

2012-07-10 Thread Gao feng
于 2012年07月10日 19:08, Eric Dumazet 写道: > On Tue, 2012-07-10 at 13:05 +0200, Eric Dumazet wrote: >> On Tue, 2012-07-10 at 18:44 +0800, Gao feng wrote: >>> there are some out of bound accesses in netprio cgroup. >> >>> - update_netdev_tables(); >>> + ret = extend_netdev_table(dev, max_len); >>> +

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

2012-07-10 Thread Neil Horman
On Tue, Jul 10, 2012 at 01:05:50PM +0200, Eric Dumazet wrote: > On Tue, 2012-07-10 at 18:44 +0800, Gao feng wrote: > > there are some out of bound accesses in netprio cgroup. > > > - update_netdev_tables(); > > + ret = extend_netdev_table(dev, max_len); > > + if (ret < 0) > > + got

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

2012-07-10 Thread Eric Dumazet
On Tue, 2012-07-10 at 13:05 +0200, Eric Dumazet wrote: > On Tue, 2012-07-10 at 18:44 +0800, Gao feng wrote: > > there are some out of bound accesses in netprio cgroup. > > > - update_netdev_tables(); > > + ret = extend_netdev_table(dev, max_len); > > + if (ret < 0) > > + goto out_f

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

2012-07-10 Thread Eric Dumazet
On Tue, 2012-07-10 at 18:44 +0800, Gao feng wrote: > there are some out of bound accesses in netprio cgroup. > - update_netdev_tables(); > + ret = extend_netdev_table(dev, max_len); > + if (ret < 0) > + goto out_free_devname; > + > ret = 0; > rcu_read_lock(); >

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

2012-07-10 Thread Gao feng
there are some out of bound accesses in netprio cgroup. now before accessing the dev->priomap.priomap array,we only check if the dev->priomap exist.and because we don't want to see additional bound checkings in fast path, so we should make sure that dev->priomap is null or array size of dev->priom