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>
This commit is contained in:

committed by
David S. Miller

vanhempi
d887331506
commit
550fd08c2c
@@ -695,7 +695,7 @@ void vlan_setup(struct net_device *dev)
|
||||
ether_setup(dev);
|
||||
|
||||
dev->priv_flags |= IFF_802_1Q_VLAN;
|
||||
dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
|
||||
dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING);
|
||||
dev->tx_queue_len = 0;
|
||||
|
||||
dev->netdev_ops = &vlan_netdev_ops;
|
||||
|
@@ -231,6 +231,7 @@ void bnep_net_setup(struct net_device *dev)
|
||||
dev->addr_len = ETH_ALEN;
|
||||
|
||||
ether_setup(dev);
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
dev->netdev_ops = &bnep_netdev_ops;
|
||||
|
||||
dev->watchdog_timeo = HZ * 2;
|
||||
|
@@ -103,7 +103,7 @@ static struct net_device_ops l2tp_eth_netdev_ops = {
|
||||
static void l2tp_eth_dev_setup(struct net_device *dev)
|
||||
{
|
||||
ether_setup(dev);
|
||||
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
dev->netdev_ops = &l2tp_eth_netdev_ops;
|
||||
dev->destructor = free_netdev;
|
||||
}
|
||||
|
@@ -698,6 +698,7 @@ static const struct net_device_ops ieee80211_monitorif_ops = {
|
||||
static void ieee80211_if_setup(struct net_device *dev)
|
||||
{
|
||||
ether_setup(dev);
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
dev->netdev_ops = &ieee80211_dataif_ops;
|
||||
dev->destructor = free_netdev;
|
||||
}
|
||||
|
Viittaa uudesa ongelmassa
Block a user