Vlad Yasevich
d66bf7dd27
net: core: Correct an over-stringent device loop detection.
...
The code in __netdev_upper_dev_link() has an over-stringent
loop detection logic that actually prevents valid configurations
from working correctly.
In particular, the logic returns an error if an upper device
is already in the list of all upper devices for a given dev.
This particular check seems to be a overzealous as it disallows
perfectly valid configurations. For example:
# ip l a link eth0 name eth0.10 type vlan id 10
# ip l a dev br0 typ bridge
# ip l s eth0.10 master br0
# ip l s eth0 master br0 <--- Will fail
If you switch the last two commands (add eth0 first), then both
will succeed. If after that, you remove eth0 and try to re-add
it, it will fail!
It appears to be enough to simply check adj_list to keeps things
safe.
I've tried stacking multiple devices multiple times in all different
combinations, and either rx_handler registration prevented the stacking
of the device linking cought the error.
Signed-off-by: Vladislav Yasevich <[email protected] >
Acked-by: Jiri Pirko <[email protected] >
Acked-by: Veaceslav Falico <[email protected] >
Signed-off-by: David S. Miller <[email protected] >
2015-05-04 14:57:59 -04:00
..
6lowpan
9p
9p: patches for 4.1 merge window
2015-04-18 17:45:30 -04:00
802
8021q
vlan: implement ndo_get_iflink
2015-04-02 14:05:00 -04:00
appletalk
atm
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2015-04-15 09:00:47 -07:00
ax25
ax25: Fix the build when CONFIG_INET is disabled
2015-03-05 13:17:39 -05:00
batman-adv
dev: introduce dev_get_iflink()
2015-04-02 14:04:59 -04:00
bluetooth
Bluetooth: hidp: Fix regression with older userspace and flags validation
2015-04-18 11:01:08 -04:00
bridge
bridge/nl: remove wrong use of NLM_F_MULTI
2015-04-29 14:59:16 -04:00
caif
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2015-03-20 18:51:09 -04:00
can
can: introduce new raw socket option to join the given CAN filters
2015-04-01 11:28:22 +02:00
ceph
crush: straw2 bucket type with an efficient 64-bit crush_ln()
2015-04-22 18:33:43 +03:00
core
net: core: Correct an over-stringent device loop detection.
2015-05-04 14:57:59 -04:00
dcb
net/dcb: Add IEEE QCN attribute
2015-03-06 21:50:02 -05:00
dccp
inet: fix possible panic in reqsk_queue_unlink()
2015-04-24 11:39:15 -04:00
decnet
netfilter: Pass socket pointer down through okfn().
2015-04-07 15:25:55 -04:00
dns_resolver
dsa
net: dsa: Fix scope of eeprom-length property
2015-04-29 15:35:04 -04:00
ethernet
hsr
ieee802154
ieee802154: don't export static symbol
2015-03-14 17:11:31 +01:00
ipv4
ipv4: Missing sk_nulls_node_init() in ping_unhash().
2015-05-01 22:02:47 -04:00
ipv6
inet: fix possible panic in reqsk_queue_unlink()
2015-04-24 11:39:15 -04:00
ipx
irda
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2015-03-09 23:38:02 -04:00
iucv
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2015-04-02 16:16:53 -04:00
key
xfrm: simplify xfrm_address_t use
2015-03-31 13:58:35 -04:00
l2tp
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2015-04-06 22:34:15 -04:00
lapb
llc
mac80211
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2015-04-15 09:00:47 -07:00
mac802154
mac802154: cleanup concurrent check
2015-03-27 19:18:50 +01:00
mpls
mpls: Prevent use of implicit NULL label as outgoing label
2015-04-22 14:24:54 -04:00
netfilter
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
2015-04-27 23:12:34 -04:00
netlabel
netlink: implement nla_put_in_addr and nla_put_in6_addr
2015-03-31 13:58:35 -04:00
netlink
netlink: Remove max_size setting
2015-05-03 23:27:02 -04:00
netrom
nfc
nfc: Fix portid type in urelease_work
2015-04-13 16:35:16 -04:00
openvswitch
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2015-04-15 09:00:47 -07:00
packet
af_packet: pass checksum validation status to the user
2015-03-23 22:01:28 -04:00
phonet
rds
net/rds: fix unaligned memory access
2015-05-03 23:39:01 -04:00
rfkill
rose
rxrpc
new helper: msg_data_left()
2015-04-11 15:53:35 -04:00
sched
codel: fix maxpacket/mtu confusion
2015-05-03 22:17:40 -04:00
sctp
sctp: avoid to repeatedly declare external variables
2015-03-25 11:40:16 -04:00
sunrpc
NFS client updates for Linux 4.1
2015-04-26 17:33:59 -07:00
switchdev
switchdev: fix stp update API to work with layered netdevices
2015-03-23 16:44:56 -04:00
tipc
tipc: fix problem with parallel link synchronization mechanism
2015-04-29 15:08:59 -04:00
unix
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2015-04-27 14:05:19 -07:00
vmw_vsock
wimax
wireless
cfg80211: don't allow disabling WEXT if it's required
2015-04-08 09:19:29 +02:00
x25
xfrm
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2015-04-14 15:44:14 -04:00
compat.c
net: switch importing msghdr from userland to {compat_,}import_iovec()
2015-04-09 00:02:26 -04:00
Kconfig
Makefile
socket.c
VFS: net/: d_inode() annotations
2015-04-15 15:06:56 -04:00
sysctl_net.c