aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2011-07-26 02:05:38 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-28 01:39:30 -0400
commit550fd08c2cebad61c548def135f67aba284c6162 (patch)
tree8aa7c4d20a9faeb42261b75cfa38d8fd27b574ff /net
parentd8873315065f1f527c7c380402cf59b1e1d0ae36 (diff)
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There are a handful of drivers that violate this assumption of course, and need to be fixed up. This patch identifies those drivers, and marks them as not being able to support the safe transmission of skbs by clearning the IFF_TX_SKB_SHARING flag in priv_flags Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: Karsten Keil <isdn@linux-pingi.de> CC: "David S. Miller" <davem@davemloft.net> CC: Jay Vosburgh <fubar@us.ibm.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: Patrick McHardy <kaber@trash.net> CC: Krzysztof Halasa <khc@pm.waw.pl> CC: "John W. Linville" <linville@tuxdriver.com> CC: Greg Kroah-Hartman <gregkh@suse.de> CC: Marcel Holtmann <marcel@holtmann.org> CC: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/8021q/vlan_dev.c2
-rw-r--r--net/bluetooth/bnep/netdev.c1
-rw-r--r--net/l2tp/l2tp_eth.c2
-rw-r--r--net/mac80211/iface.c1
4 files changed, 4 insertions, 2 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 934e221c1d07..9d40a071d038 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -695,7 +695,7 @@ void vlan_setup(struct net_device *dev)
695 ether_setup(dev); 695 ether_setup(dev);
696 696
697 dev->priv_flags |= IFF_802_1Q_VLAN; 697 dev->priv_flags |= IFF_802_1Q_VLAN;
698 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; 698 dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING);
699 dev->tx_queue_len = 0; 699 dev->tx_queue_len = 0;
700 700
701 dev->netdev_ops = &vlan_netdev_ops; 701 dev->netdev_ops = &vlan_netdev_ops;
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c
index 8c100c9dae28..d4f5dff7c955 100644
--- a/net/bluetooth/bnep/netdev.c
+++ b/net/bluetooth/bnep/netdev.c
@@ -231,6 +231,7 @@ void bnep_net_setup(struct net_device *dev)
231 dev->addr_len = ETH_ALEN; 231 dev->addr_len = ETH_ALEN;
232 232
233 ether_setup(dev); 233 ether_setup(dev);
234 dev->priv_flags &= ~IFF_TX_SKB_SHARING;
234 dev->netdev_ops = &bnep_netdev_ops; 235 dev->netdev_ops = &bnep_netdev_ops;
235 236
236 dev->watchdog_timeo = HZ * 2; 237 dev->watchdog_timeo = HZ * 2;
diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
index a8193f52c13c..d2726a74597d 100644
--- a/net/l2tp/l2tp_eth.c
+++ b/net/l2tp/l2tp_eth.c
@@ -103,7 +103,7 @@ static struct net_device_ops l2tp_eth_netdev_ops = {
103static void l2tp_eth_dev_setup(struct net_device *dev) 103static void l2tp_eth_dev_setup(struct net_device *dev)
104{ 104{
105 ether_setup(dev); 105 ether_setup(dev);
106 106 dev->priv_flags &= ~IFF_TX_SKB_SHARING;
107 dev->netdev_ops = &l2tp_eth_netdev_ops; 107 dev->netdev_ops = &l2tp_eth_netdev_ops;
108 dev->destructor = free_netdev; 108 dev->destructor = free_netdev;
109} 109}
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index cd5fb40d3fd4..556e7e6ddf0a 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -698,6 +698,7 @@ static const struct net_device_ops ieee80211_monitorif_ops = {
698static void ieee80211_if_setup(struct net_device *dev) 698static void ieee80211_if_setup(struct net_device *dev)
699{ 699{
700 ether_setup(dev); 700 ether_setup(dev);
701 dev->priv_flags &= ~IFF_TX_SKB_SHARING;
701 dev->netdev_ops = &ieee80211_dataif_ops; 702 dev->netdev_ops = &ieee80211_dataif_ops;
702 dev->destructor = free_netdev; 703 dev->destructor = free_netdev;
703} 704}