diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-08 15:43:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-08 15:43:12 +0200 |
commit | 4e1a606d552de03aec2b1fd157011bf012fcc870 (patch) | |
tree | 7d7683fc2d5286a36782df572f475abb3bb2e173 /drivers/net/team/team.c | |
parent | TTY: sn_console: Replace spin_is_locked() with spin_trylock() (diff) | |
parent | Linux 4.19-rc7 (diff) | |
download | linux-4e1a606d552de03aec2b1fd157011bf012fcc870.tar.xz linux-4e1a606d552de03aec2b1fd157011bf012fcc870.zip |
Merge 4.19-rc7 into tty-next
We want the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/team/team.c')
-rw-r--r-- | drivers/net/team/team.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 6a047d30e8c6..d887016e54b6 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -1167,6 +1167,12 @@ static int team_port_add(struct team *team, struct net_device *port_dev, return -EBUSY; } + if (dev == port_dev) { + NL_SET_ERR_MSG(extack, "Cannot enslave team device to itself"); + netdev_err(dev, "Cannot enslave team device to itself\n"); + return -EINVAL; + } + if (port_dev->features & NETIF_F_VLAN_CHALLENGED && vlan_uses_dev(dev)) { NL_SET_ERR_MSG(extack, "Device is VLAN challenged and team device has VLAN set up"); |