aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/smsc/smsc911x.c
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevich@gmail.com>2015-05-02 21:33:44 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-04 14:57:59 -0400
commitd66bf7dd27573ee5ea90484899ee952c19ccb194 (patch)
tree77dc7bbbf2e6eefb4f861449ec9d2abf1c5ce140 /drivers/net/ethernet/smsc/smsc911x.c
parentisdn/gigaset: cede maintainership (diff)
downloadlinux-dev-d66bf7dd27573ee5ea90484899ee952c19ccb194.tar.xz
linux-dev-d66bf7dd27573ee5ea90484899ee952c19ccb194.zip
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 <vyasevic@redhat.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Veaceslav Falico <vfalico@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/smsc/smsc911x.c')
0 files changed, 0 insertions, 0 deletions