From: Andrew Collins <acollins@cradlepoint.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <mschiffer@universe-factory.net>,
<vfalico@redhat.com>, <vfalico@gmail.com>
Subject: Re: [RFC] Add netdev all_adj_list refcnt propagation to fix panic
Date: Wed, 30 Mar 2016 14:32:44 -0600 [thread overview]
Message-ID: <56FC37EC.7020404@cradlepoint.com> (raw)
In-Reply-To: <20160330.160150.1290720758360796805.davem@davemloft.net>
> From: Andrew Collins <acollins@cradlepoint.com>
> Date: Tue, 29 Mar 2016 11:25:03 -0600
>
>> This is an RFC patch to fix a relatively easily reproducible kernel
>> panic related to the all_adj_list handling for netdevs in recent kernels.
>>
>> This is more to generate discussion than anything else. I don't
>> particularly like this approach, I'm hoping someone has a better idea.
>>
>> The following sequence of commands will reproduce the issue:
>>
>> ip link add link eth0 name eth0.100 type vlan id 100
>> ip link add link eth0 name eth0.200 type vlan id 200
>> ip link add name testbr type bridge
>> ip link set eth0.100 master testbr
>> ip link set eth0.200 master testbr
>> ip link add link testbr mac0 type macvlan
>> ip link delete dev testbr
>>
>> This creates an upper/lower tree of (excuse the poor ASCII art):
>>
>> /---eth0.100-eth0
>> mac0-testbr-
>> \---eth0.200-eth0
>>
>> When testbr is deleted, the all_adj_lists are walked, and eth0 is deleted twice from
>> the mac0 list. Unfortunately, during setup in __netdev_upper_dev_link, only one
>> reference to eth0 is added, so this results in a panic.
>>
>> This change adds reference count propagation so things are handled properly.
>>
>> Matthias Schiffer reported a similar crash in batman-adv:
>>
>> https://github.com/freifunk-gluon/gluon/issues/680
>> https://www.open-mesh.org/issues/247
>>
>> which this patch also seems to resolve.
>
> Veaceslav, please look into this.
>
> Thanks.
>
> !SIG:56fc30b5184771297483788!
>
+vfalico's new address picked up from git logs
prev parent reply other threads:[~2016-03-30 21:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 17:25 [RFC] Add netdev all_adj_list refcnt propagation to fix panic Andrew Collins
2016-03-30 20:01 ` David Miller
2016-03-30 20:15 ` David Miller
2016-03-30 20:32 ` Andrew Collins [this message]
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=56FC37EC.7020404@cradlepoint.com \
--to=acollins@cradlepoint.com \
--cc=davem@davemloft.net \
--cc=mschiffer@universe-factory.net \
--cc=netdev@vger.kernel.org \
--cc=vfalico@gmail.com \
--cc=vfalico@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.