[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150324095809.6d6b911c@griffin>
Date: Tue, 24 Mar 2015 09:58:09 +0100
From: Jiri Benc <jbenc@...hat.com>
To: Mahesh Bandewar <maheshb@...gle.com>
Cc: linux-netdev <netdev@...r.kernel.org>,
Dan Williams <dcbw@...hat.com>
Subject: Re: [PATCH net] ipvlan: fix addr hash list corruption
On Mon, 23 Mar 2015 18:10:01 -0700, Mahesh Bandewar wrote:
> On Mon, Mar 23, 2015 at 2:10 PM, Jiri Benc <jbenc@...hat.com> wrote:
> > When ipvlan interface with IP addresses attached is brought down and then
> > deleted, the assigned addresses are deleted twice from the address hash
> > list, first on the interface down and second on the link deletion.
> > Similarly, when an address is added while the interface is down, it is added
> > second time once the interface is brought up.
> >
> Presumably this is creating problems for you and I'm not sure why? Do
> you have a script / (sequence of commands) to produce this condition?
You cannot call hlist_del_rcu on the same pointer twice. Nor
hlist_add_head_rcu, for that matter.
Try e.g.:
ip link add link eth0 name ipvl0 type ipvlan mode l2
ip link set ipvl0 up
ip addr add 1.2.3.1/24 dev ipvl0
ip link set ipvl0 down
-> ipvlan_ht_addr_del(1.2.3.1)
ip link del ipvl0
-> ipvlan_ht_addr_del(1.2.3.1)
-> crash
Or:
ip link add link eth0 name ipvl0 type ipvlan mode l2
ip addr add 1.2.3.1/24 dev ipvl0
-> ipvlan_ht_addr_add(1.2.3.1)
ip link set ipvl0 up
-> ipvlan_ht_addr_add(1.2.3.1)
-> does not crash immediately but the list is corrupted, go see how the
pointers in port->hlhead[hash] list look now
> ipvlan_ht_addr_del() does use synchronize_rcu() expect when the device
> in dismantle state. Could that be a reason?
This has nothing to do with RCU.
Jiri
--
Jiri Benc
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists