]> git.baikalelectronics.ru Git - kernel.git/commit
net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup
authorXie He <xie.he.0141@gmail.com>
Tue, 20 Oct 2020 06:34:20 +0000 (23:34 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 Oct 2020 00:58:26 +0000 (17:58 -0700)
commit8ef8f0571acba83ff20571f63b92c05655726b5e
tree0085eb62bfa2cbb08fd1407c75bbb34b24efebaf
parent4ee1c8f2d8daaf38593c4f6b37559372c1fee629
net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup

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: 64bb6eec6a16 ("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>
drivers/net/wan/hdlc_raw_eth.c