netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gao feng <gaofeng@cn.fujitsu.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: nhorman@tuxdriver.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, lizefan@huawei.com, tj@kernel.org,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH v2] net: cgroup: fix access the unallocated memory in netprio cgroup
Date: Wed, 11 Jul 2012 09:39:38 +0800	[thread overview]
Message-ID: <4FFCD95A.1060204@cn.fujitsu.com> (raw)
In-Reply-To: <1341918530.3265.4839.camel@edumazet-glaptop>

于 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);
>>> +	if (ret < 0)
>>> +		goto out_free_devname;
>>> +
>>>  	ret = 0;
>>>  	rcu_read_lock();
>>>  	map = rcu_dereference(dev->priomap);
>>
>> Its unfortunately adding a bug.
>>
>> extend_netdev_table() is protected by RTNL.
> 
> Please test your next patch using :
> 
> CONFIG_LOCKDEP=y
> CONFIG_PROVE_RCU=y
> 
> Because rtnl_dereference() should shout if you dont hold RTNL
> 

Oops, I miss it.
Thanks Eric & Neil,I will test v3 patch with these two CONFIG.

  reply	other threads:[~2012-07-11  1:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 10:44 [PATCH v2] net: cgroup: fix access the unallocated memory in netprio cgroup Gao feng
2012-07-10 11:05 ` Eric Dumazet
2012-07-10 11:08   ` Eric Dumazet
2012-07-11  1:39     ` Gao feng [this message]
2012-07-10 11:32   ` Neil Horman

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=4FFCD95A.1060204@cn.fujitsu.com \
    --to=gaofeng@cn.fujitsu.com \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).