public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Gao feng <gaofeng@cn•fujitsu.com>
To: John Fastabend <john.r.fastabend@intel•com>
Cc: davem@davemloft•net, nhorman@tuxdriver•com,
	mark.d.rustad@intel•com, netdev@vger•kernel.org,
	eric.dumazet@gmail•com
Subject: Re: [RFC PATCH] net: cgroup: null ptr dereference in netprio cgroup during init
Date: Wed, 18 Jul 2012 15:58:25 +0800	[thread overview]
Message-ID: <50066CA1.1060305@cn.fujitsu.com> (raw)
In-Reply-To: <50064E95.7020503@intel.com>

于 2012年07月18日 13:50, John Fastabend 写道:
> On 7/17/2012 6:59 PM, Gao feng wrote:
>> 于 2012年07月18日 08:33, John Fastabend 写道:
>>> When the netprio cgroup is built in the kernel cgroup_init will call
>>> cgrp_create which eventually calls update_netdev_tables. This is
>>> being called before do_initcalls() so a null ptr dereference occurs
>>> on init_net.
>>>
> 
> [...]
> 
>>
>>
>> Thanks John.
>> It's my mistake.
>>
>> Can we make sure init_net.count is zero here?
>> I can't find some places to initialize it to zero.
>>
> 
> Its defined in net_namespace.c so it's zeroed by virtue
> of being global. And initialized in setup_net via
> pure_initcall() always after cgroup_init() if I've done
> my accounting correctly.

This looks fine to me.
Thanks John.

  reply	other threads:[~2012-07-18  7:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18  0:33 [RFC PATCH] net: cgroup: null ptr dereference in netprio cgroup during init John Fastabend
2012-07-18  1:59 ` Gao feng
2012-07-18  5:50   ` John Fastabend
2012-07-18  7:58     ` Gao feng [this message]
2012-07-18 12:45 ` Neil Horman
2012-07-18 14:21   ` John Fastabend
2012-07-18 15:14     ` John Fastabend
2012-07-18 16:50       ` Neil Horman
2012-07-18 17:14       ` Neil Horman
2012-07-18 15:25     ` Neil Horman
2012-07-18 15:53       ` David Miller
2012-07-18 16:37         ` Neil Horman
2012-07-18 16:39           ` David Miller
2012-07-18 16:26 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50066CA1.1060305@cn.fujitsu.com \
    --to=gaofeng@cn$(echo .)fujitsu.com \
    --cc=davem@davemloft$(echo .)net \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=john.r.fastabend@intel$(echo .)com \
    --cc=mark.d.rustad@intel$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nhorman@tuxdriver$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox