From: David Miller <davem@davemloft.net>
To: idosch@mellanox.com
Cc: netdev@vger.kernel.org, jiri@mellanox.com
Subject: Re: [PATCH net] team: Forbid enslaving team device to itself
Date: Thu, 04 Oct 2018 13:56:20 -0700 (PDT) [thread overview]
Message-ID: <20181004.135620.905434760592364740.davem@davemloft.net> (raw)
In-Reply-To: <20181001092159.24775-1-idosch@mellanox.com>
From: Ido Schimmel <idosch@mellanox.com>
Date: Mon, 1 Oct 2018 12:21:59 +0300
> team's ndo_add_slave() acquires 'team->lock' and later tries to open the
> newly enslaved device via dev_open(). This emits a 'NETDEV_UP' event
> that causes the VLAN driver to add VLAN 0 on the team device. team's
> ndo_vlan_rx_add_vid() will also try to acquire 'team->lock' and
> deadlock.
>
> Fix this by checking early at the enslavement function that a team
> device is not being enslaved to itself.
>
> A similar check was added to the bond driver in commit 09a89c219baf
> ("bonding: disallow enslaving a bond to itself").
...
> Fixes: 87002b03baab ("net: introduce vlan_vid_[add/del] and use them instead of direct [add/kill]_vid ndo calls")
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Reported-and-tested-by: syzbot+bd051aba086537515cdb@syzkaller.appspotmail.com
Applied and queued up for -stable.
prev parent reply other threads:[~2018-10-05 3:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 9:21 [PATCH net] team: Forbid enslaving team device to itself Ido Schimmel
2018-10-04 20:56 ` David Miller [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=20181004.135620.905434760592364740.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.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