linux_dsm_epyc7002/drivers/net
Xie He 8754e1379e drivers/net/wan: lapb: Corrected the usage of skb_cow
This patch fixed 2 issues with the usage of skb_cow in LAPB drivers
"lapbether" and "hdlc_x25":

1) After skb_cow fails, kfree_skb should be called to drop a reference
to the skb. But in both drivers, kfree_skb is not called.

2) skb_cow should be called before skb_push so that is can ensure the
safety of skb_push. But in "lapbether", it is incorrectly called after
skb_push.

More details about these 2 issues:

1) The behavior of calling kfree_skb on failure is also the behavior of
netif_rx, which is called by this function with "return netif_rx(skb);".
So this function should follow this behavior, too.

2) In "lapbether", skb_cow is called after skb_push. This results in 2
logical issues:
   a) skb_push is not protected by skb_cow;
   b) An extra headroom of 1 byte is ensured after skb_push. This extra
      headroom has no use in this function. It also has no use in the
      upper-layer function that this function passes the skb to
      (x25_lapb_receive_frame in net/x25/x25_dev.c).
So logically skb_cow should instead be called before skb_push.

Cc: Eric Dumazet <edumazet@google.com>
Cc: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Xie He <xie.he.0141@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-07-24 20:17:42 -07:00
..
appletalk
arcnet
bonding bonding: check return value of register_netdevice() in bond_newlink() 2020-07-23 15:17:04 -07:00
caif
can
dsa net: dsa: microchip: call phy_remove_link_mode during probe 2020-07-21 15:50:02 -07:00
ethernet cxgb4: add missing release on skb in uld_send() 2020-07-22 20:04:17 -07:00
fddi
fjes
hamradio
hippi hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path 2020-07-14 14:11:49 -07:00
hyperv
ieee802154 net: ieee802154: adf7242: Replace HTTP links with HTTPS ones 2020-07-20 08:51:38 +02:00
ipa
ipvlan
netdevsim netdevsim: fix unbalaced locking in nsim_create() 2020-07-21 16:00:43 -07:00
phy net: dp83640: fix SIOCSHWTSTAMP to update the struct with actual configuration 2020-07-16 13:27:40 -07:00
plip
ppp
slip
team
usb ax88172a: fix ax88172a_unbind() failures 2020-07-15 18:26:29 -07:00
vmxnet3
wan drivers/net/wan: lapb: Corrected the usage of skb_cow 2020-07-24 20:17:42 -07:00
wimax
wireguard
wireless wireless-drivers fixes for v5.8 2020-07-24 17:26:09 -07:00
xen-netback
bareudp.c
dummy.c
eql.c
geneve.c geneve: fix an uninitialized value in geneve_changelink() 2020-07-23 15:19:58 -07:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c
virtio_net.c
vrf.c
vsockmon.c
vxlan.c
xen-netfront.c xen-netfront: fix potential deadlock in xennet_remove() 2020-07-24 17:02:01 -07:00