aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-22 21:23:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-22 21:23:33 -0400
commit98f75b8291a89ba6bf73e322ee467ce0bfeb91c1 (patch)
treec9f61617d49973d2d8fc684183be0ce1820a0338 /net/core/dev.c
parent9478303619bc87c575e894d867049b25f33bf124 (diff)
parente18b7faae15dbd47e5811ed748bd5b500dcfaa2d (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) If the user gives us a msg_namelen of 0, don't try to interpret anything pointed to by msg_name. From Ani Sinha. 2) Fix some bnx2i/bnx2fc randconfig compilation errors. The gist of the issue is that we firstly have drivers that span both SCSI and networking. And at the top of that chain of dependencies we have things like SCSI_FC_ATTRS and SCSI_NETLINK which are selected. But since select is a sledgehammer and ignores dependencies, everything to select's SCSI_FC_ATTRS and/or SCSI_NETLINK has to also explicitly select their dependencies and so on and so forth. Generally speaking 'select' is supposed to only be used for child nodes, those which have no dependencies of their own. And this whole chain of dependencies in the scsi layer violates that rather strongly. So just make SCSI_NETLINK depend upon it's dependencies, and so on and so forth for the things selecting it (either directly or indirectly). From Anish Bhatt and Randy Dunlap. 3) Fix generation of blackhole routes in IPSEC, from Steffen Klassert. 4) Actually notice netdev feature changes in rtl_open() code, from Hayes Wang. 5) Fix divide by zero in bond enslaving, from Nikolay Aleksandrov. 6) Missing memory barrier in sunvnet driver, from David Stevens. 7) Don't leave anycast addresses around when ipv6 interface is destroyed, from Sabrina Dubroca. 8) Don't call efx_{arch}_filter_sync_rx_mode before addr_list_lock is initialized in SFC driver, from Edward Cree. 9) Fix missing DMA error checking in 3c59x, from Neal Horman. 10) Openvswitch doesn't emit OVS_FLOW_CMD_NEW notifications accidently, fix from Samuel Gauthier. 11) pch_gbe needs to select NET_PTP_CLASSIFY otherwise we can get a build error. 12) Fix macvlan regression wherein we stopped emitting broadcast/multicast frames over software devices. From Nicolas Dichtel. 13) Fix infiniband bug due to unintended overflow of skb->cb[], from Eric Dumazet. And add an assertion so this doesn't happen again. 14) dm9000_parse_dt() should return error pointers, not NULL. From Tobias Klauser. 15) IP tunneling code uses this_cpu_ptr() in preemptible contexts, fix from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (87 commits) net: bcmgenet: call bcmgenet_dma_teardown in bcmgenet_fini_dma net: bcmgenet: fix TX reclaim accounting for fragments ipv4: do not use this_cpu_ptr() in preemptible context dm9000: Return an ERR_PTR() in all error conditions of dm9000_parse_dt() r8169: fix an if condition r8152: disable ALDPS ipoib: validate struct ipoib_cb size net: sched: shrink struct qdisc_skb_cb to 28 bytes tg3: Work around HW/FW limitations with vlan encapsulated frames macvlan: allow to enqueue broadcast pkt on virtual device pch_gbe: 'select' NET_PTP_CLASSIFY. scsi: Use 'depends' with LIBFC instead of 'select'. openvswitch: restore OVS_FLOW_CMD_NEW notifications genetlink: add function genl_has_listeners() lib: rhashtable: remove second linux/log2.h inclusion net: allow macvlans to move to net namespace 3c59x: Fix bad offset spec in skb_frag_dma_map 3c59x: Add dma error checking and recovery sparc: bpf_jit: fix support for ldx/stx mem and SKF_AD_VLAN_TAG can: at91_can: add missing prepare and unprepare of the clock ...
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index ab9a16530c36..cf8a95f48cff 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4809,9 +4809,14 @@ static void netdev_adjacent_sysfs_del(struct net_device *dev,
4809 sysfs_remove_link(&(dev->dev.kobj), linkname); 4809 sysfs_remove_link(&(dev->dev.kobj), linkname);
4810} 4810}
4811 4811
4812#define netdev_adjacent_is_neigh_list(dev, dev_list) \ 4812static inline bool netdev_adjacent_is_neigh_list(struct net_device *dev,
4813 (dev_list == &dev->adj_list.upper || \ 4813 struct net_device *adj_dev,
4814 dev_list == &dev->adj_list.lower) 4814 struct list_head *dev_list)
4815{
4816 return (dev_list == &dev->adj_list.upper ||
4817 dev_list == &dev->adj_list.lower) &&
4818 net_eq(dev_net(dev), dev_net(adj_dev));
4819}
4815 4820
4816static int __netdev_adjacent_dev_insert(struct net_device *dev, 4821static int __netdev_adjacent_dev_insert(struct net_device *dev,
4817 struct net_device *adj_dev, 4822 struct net_device *adj_dev,
@@ -4841,7 +4846,7 @@ static int __netdev_adjacent_dev_insert(struct net_device *dev,
4841 pr_debug("dev_hold for %s, because of link added from %s to %s\n", 4846 pr_debug("dev_hold for %s, because of link added from %s to %s\n",
4842 adj_dev->name, dev->name, adj_dev->name); 4847 adj_dev->name, dev->name, adj_dev->name);
4843 4848
4844 if (netdev_adjacent_is_neigh_list(dev, dev_list)) { 4849 if (netdev_adjacent_is_neigh_list(dev, adj_dev, dev_list)) {
4845 ret = netdev_adjacent_sysfs_add(dev, adj_dev, dev_list); 4850 ret = netdev_adjacent_sysfs_add(dev, adj_dev, dev_list);
4846 if (ret) 4851 if (ret)
4847 goto free_adj; 4852 goto free_adj;
@@ -4862,7 +4867,7 @@ static int __netdev_adjacent_dev_insert(struct net_device *dev,
4862 return 0; 4867 return 0;
4863 4868
4864remove_symlinks: 4869remove_symlinks:
4865 if (netdev_adjacent_is_neigh_list(dev, dev_list)) 4870 if (netdev_adjacent_is_neigh_list(dev, adj_dev, dev_list))
4866 netdev_adjacent_sysfs_del(dev, adj_dev->name, dev_list); 4871 netdev_adjacent_sysfs_del(dev, adj_dev->name, dev_list);
4867free_adj: 4872free_adj:
4868 kfree(adj); 4873 kfree(adj);
@@ -4895,8 +4900,7 @@ static void __netdev_adjacent_dev_remove(struct net_device *dev,
4895 if (adj->master) 4900 if (adj->master)
4896 sysfs_remove_link(&(dev->dev.kobj), "master"); 4901 sysfs_remove_link(&(dev->dev.kobj), "master");
4897 4902
4898 if (netdev_adjacent_is_neigh_list(dev, dev_list) && 4903 if (netdev_adjacent_is_neigh_list(dev, adj_dev, dev_list))
4899 net_eq(dev_net(dev),dev_net(adj_dev)))
4900 netdev_adjacent_sysfs_del(dev, adj_dev->name, dev_list); 4904 netdev_adjacent_sysfs_del(dev, adj_dev->name, dev_list);
4901 4905
4902 list_del_rcu(&adj->list); 4906 list_del_rcu(&adj->list);