aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index a9fe14908b44..c6bbf310d407 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5219,6 +5219,20 @@ struct net_device *netdev_master_upper_dev_get(struct net_device *dev)
}
EXPORT_SYMBOL(netdev_master_upper_dev_get);
+/**
+ * netdev_has_any_lower_dev - Check if device is linked to some device
+ * @dev: device
+ *
+ * Find out if a device is linked to a lower device and return true in case
+ * it is. The caller must hold the RTNL lock.
+ */
+static bool netdev_has_any_lower_dev(struct net_device *dev)
+{
+ ASSERT_RTNL();
+
+ return !list_empty(&dev->adj_list.lower);
+}
+
void *netdev_adjacent_get_private(struct list_head *adj_list)
{
struct netdev_adjacent *adj;
@@ -6616,6 +6630,7 @@ static void rollback_registered_many(struct list_head *head)
/* Notifier chain MUST detach us all upper devices. */
WARN_ON(netdev_has_any_upper_dev(dev));
+ WARN_ON(netdev_has_any_lower_dev(dev));
/* Remove entries from kobject tree */
netdev_unregister_kobject(dev);
2012-04-10rt2x00: Fix rfkill_polling register function.Chen, Chien-Chia1-5/+1 2012-04-10bcma: fix build error on MIPS; implicit pcibios_enable_devicePaul Gortmaker2-1/+2 2012-04-09net/wireless/wext-core.c: add missing kfreeJulia Lawall1-2/+4 2012-04-09rtlwifi: Fix oops on rate-control failureLarry Finger1-1/+4 2012-04-09mac80211: Convert WARN_ON to WARN_ON_ONCELarry Finger1-1/+1 2012-04-09rtlwifi: rtl8192de: Fix firmware initializationLarry Finger1-6/+0 2012-04-09nl80211: ensure interface is up in various APIsJohannes Berg1-13/+18 2012-04-09mac80211: fix association beacon wait timeoutJohannes Berg1-2/+1 2012-04-06Make the "word-at-a-time" helper functions more commonly usableLinus Torvalds2-32/+49 2012-04-06net: fix a race in sock_queue_err_skb()Eric Dumazet1-1/+3 2012-04-06netlink: fix races after skb queueingEric Dumazet1-11/+13 2012-04-06doc, net: Update ndo_start_xmit return type and valuesBen Hutchings1-10/+12 2012-04-06doc, net: Remove instruction to set net_device::trans_startBen Hutchings1-5/+2 2012-04-06doc, net: Update netdev operation namesBen Hutchings2-14/+14 2012-04-06doc, net: Update documentation of synchronisation for TX multiqueueBen Hutchings1-3/+3 2012-04-06doc, net: Remove obsolete reference to dev->pollBen Hutchings1-2/+1 2012-04-06ethtool: Remove exception to the requirement of holding RTNL lockBen Hutchings1-2/+1 2012-04-06blackfin: update defconfig for bf527-ezkitBob Liu1-0/+1 2012-04-06blackfin: gpio: fix compile error if !CONFIG_GPIOLIBBob Liu1-2/+12 2012-04-06blackfin: fix L1 data A overflow link issueMike Frysinger1-1/+1 2012-04-05MAINTAINERS: update for Marvell Ethernet driversstephen hemminger1-12/+7 2012-04-05bonding: properly unset current_arp_slave on slave link upVeaceslav Falico1-1/+5 2012-04-05phonet: Check input from user before allocatingSasha Levin1-0/+3 2012-04-05tcp: tcp_sendpages() should call tcp_push() onceEric Dumazet4-6/+9 2012-04-05memcg swap: use mem_cgroup_uncharge_swap fixMichal Hocko1-7/+7 2012-04-05backlight: add driver for DA9052/53 PMIC v1Ashish Jangam3-0/+194 2012-04-05C6X: use set_current_blocked() and block_sigmask()Matt Fleming1-13/+3 2012-04-05MAINTAINERS: add entry for sparse checkerChristopher Li1-0/+9 2012-04-05MAINTAINERS: fix REMOTEPROC F: typoJoe Perches1-1/+1 2012-04-05alpha: use set_current_blocked() and block_sigmask()Matt Fleming1-21/+10 2012-04-05simple_open: automatically convert to simple_open()Stephen Boyd63-572/+176