diff options
author | Xie He <xie.he.0141@gmail.com> | 2020-10-19 23:34:20 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-29 09:05:31 +0100 |
commit | 1148d809f2ab7652cc23b68862ed69db5fd4742f (patch) | |
tree | b02a5d0388e813dc5fabea855705a256a5be5d30 | |
parent | 03c795ae6ac2297ac04d3f1d90015900f2c9b5c2 (diff) | |
download | linux-stable-1148d809f2ab7652cc23b68862ed69db5fd4742f.tar.gz linux-stable-1148d809f2ab7652cc23b68862ed69db5fd4742f.tar.bz2 linux-stable-1148d809f2ab7652cc23b68862ed69db5fd4742f.zip |
net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup
[ Upstream commit 5fce1e43e2d5bf2f7e3224d7b99b1c65ab2c26e2 ]
This driver calls ether_setup to set up the network device.
The ether_setup function would add the IFF_TX_SKB_SHARING flag to the
device. This flag indicates that it is safe to transmit shared skbs to
the device.
However, this is not true. This driver may pad the frame (in eth_tx)
before transmission, so the skb may be modified.
Fixes: 550fd08c2ceb ("net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared")
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Xie He <xie.he.0141@gmail.com>
Link: https://lore.kernel.org/r/20201020063420.187497-1-xie.he.0141@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/net/wan/hdlc_raw_eth.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wan/hdlc_raw_eth.c b/drivers/net/wan/hdlc_raw_eth.c index 2f11836078ab..1be781f8ffc1 100644 --- a/drivers/net/wan/hdlc_raw_eth.c +++ b/drivers/net/wan/hdlc_raw_eth.c @@ -101,6 +101,7 @@ static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr) old_qlen = dev->tx_queue_len; ether_setup(dev); dev->tx_queue_len = old_qlen; + dev->priv_flags &= ~IFF_TX_SKB_SHARING; eth_hw_addr_random(dev); call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE, dev); netif_dormant_off(dev); |