netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: acollins@cradlepoint.com
Cc: dsa@cumulusnetworks.com, netdev@vger.kernel.org,
	vfalico@gmail.com, nikolay@cumulusnetworks.com
Subject: Re: [PATCH net] Add netdev all_adj_list refcnt propagation to fix panic
Date: Tue, 04 Oct 2016 02:06:28 -0400 (EDT)	[thread overview]
Message-ID: <20161004.020628.353742496666781216.davem@davemloft.net> (raw)
In-Reply-To: <1475523782-6358-1-git-send-email-acollins@cradlepoint.com>

From: Andrew Collins <acollins@cradlepoint.com>
Date: Mon, 3 Oct 2016 13:43:02 -0600

> This is a respin of a patch to fix a relatively easily reproducible kernel
> panic related to the all_adj_list handling for netdevs in recent kernels.
> 
> 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.
> 
> Signed-off-by: Andrew Collins <acollins@cradlepoint.com>

Applied and queued up for -stable, thanks.

  reply	other threads:[~2016-10-04  6:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03 19:43 [PATCH net] Add netdev all_adj_list refcnt propagation to fix panic Andrew Collins
2016-10-04  6:06 ` David Miller [this message]
2016-10-05  6:32   ` David Ahern

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=20161004.020628.353742496666781216.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=acollins@cradlepoint.com \
    --cc=dsa@cumulusnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=vfalico@gmail.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 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).