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

2012-07-19 Thread Neil Horman
On Thu, Jul 19, 2012 at 09:00:51AM +0800, Li Zefan wrote: > > static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp) > > > { > > struct cgroup_netprio_state *cs; > > - int ret; > > + int ret = -EINVAL; > > > > cs = kzalloc(size

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

2012-07-18 Thread Li Zefan
> static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp) > { > struct cgroup_netprio_state *cs; > - int ret; > + int ret = -EINVAL; > > cs = kzalloc(sizeof(*cs), GFP_KERNEL); > if (!cs) > return ERR_PTR(-ENOMEM); > > - if (

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

2012-07-18 Thread Neil Horman
On Wed, Jul 18, 2012 at 07:10:18AM -0700, John Fastabend wrote: > On 7/18/2012 5:21 AM, Neil Horman wrote: > >On Tue, Jul 17, 2012 at 01:47:25PM -0700, John Fastabend wrote: > >>On 7/12/2012 12:50 AM, Gao feng wrote: > >>>there are some out of bound accesses in netprio cgroup. > >>> > >>>now before

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

2012-07-18 Thread John Fastabend
On 7/18/2012 5:21 AM, Neil Horman wrote: On Tue, Jul 17, 2012 at 01:47:25PM -0700, John Fastabend wrote: On 7/12/2012 12:50 AM, Gao feng wrote: 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.an

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

2012-07-18 Thread Neil Horman
On Tue, Jul 17, 2012 at 01:47:25PM -0700, John Fastabend wrote: > On 7/12/2012 12:50 AM, Gao feng wrote: > >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

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

2012-07-17 Thread John Fastabend
On 7/12/2012 12:50 AM, Gao feng wrote: 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->pr

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

2012-07-16 Thread David Miller
From: Neil Horman Date: Thu, 12 Jul 2012 06:56:11 -0400 > On Thu, Jul 12, 2012 at 03:50:15PM +0800, Gao feng wrote: >> there are some out of bound accesses in netprio cgroup. ... >> Signed-off-by: Gao feng > > Acked-by: Neil Horman > Applied to 'net', thanks. -- To unsubscribe from this lis

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

2012-07-12 Thread Neil Horman
On Thu, Jul 12, 2012 at 03:50:15PM +0800, Gao feng wrote: > 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 sh