android_kernel_motorola_sm6375/drivers/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Xie He 1aff51292e drivers/net/wan: lapb: Corrected the usage of skb_cow
[ Upstream commit 8754e1379e7089516a449821f88e1fe1ebbae5e1 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-05 09:59:51 +02:00
..
appletalk
arcnet
bonding bonding: check return value of register_netdevice() in bond_newlink() 2020-07-29 10:18:35 +02:00
caif
can
dsa net: dsa: microchip: call phy_remove_link_mode during probe 2020-07-29 10:18:33 +02:00
ethernet cxgb4: add missing release on skb in uld_send() 2020-08-05 09:59:51 +02:00
fddi
fjes
hamradio yam: fix possible memory leak in yam_init_driver 2020-06-24 17:50:18 +02:00
hippi hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path 2020-07-29 10:18:31 +02:00
hyperv
ieee802154 ieee802154: fix one possible memleak in adf7242_probe 2020-07-29 10:18:32 +02:00
ipvlan
netdevsim netdevsim: fix unbalaced locking in nsim_create() 2020-07-29 10:18:33 +02:00
phy net: dp83640: fix SIOCSHWTSTAMP to update the struct with actual configuration 2020-07-29 10:18:32 +02:00
plip
ppp pppoe: only process PADT targeted at local interfaces 2020-05-20 08:20:09 +02:00
slip
team team: fix hang in team_mode_get() 2020-04-29 16:33:09 +02:00
usb usb: hso: Fix debug compile warning on sparc32 2020-08-05 09:59:49 +02:00
vmxnet3 net: vmxnet3: fix possible buffer overflow caused by bad DMA value in vmxnet3_get_rss() 2020-06-22 09:30:57 +02:00
wan drivers/net/wan: lapb: Corrected the usage of skb_cow 2020-08-05 09:59:51 +02:00
wimax wimax/i2400m: Fix potential urb refcnt leak 2020-05-10 10:31:26 +02:00
wireless ath10k: enable transmit data ack RSSI for QCA9884 2020-08-05 09:59:41 +02:00
xen-netback
dummy.c
eql.c
geneve.c geneve: fix an uninitialized value in geneve_changelink() 2020-07-29 10:18:35 +02:00
gtp.c gtp: set NLM_F_MULTI flag in gtp_genl_dump_pdp() 2020-05-27 17:46:33 +02:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c net: macsec: preserve ingress frame ordering 2020-05-14 07:58:21 +02:00
macvlan.c macvlan: Skip loopback packets in RX handler 2020-06-22 09:31:09 +02:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c net_failover: fixed rollback in net_failover_open() 2020-06-17 16:40:19 +02:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: correct header offsets in napi frags mode 2020-06-17 16:40:20 +02:00
veth.c veth: Adjust hard_start offset on redirect XDP frames 2020-06-22 09:31:06 +02:00
virtio_net.c virtio_net: fix lockdep warning on 32 bit 2020-05-20 08:20:10 +02:00
vrf.c vrf: Check skb for XFRM_TRANSFORMED flag 2020-04-29 16:33:11 +02:00
vsockmon.c
vxlan.c vxlan: fix memleak of fdb 2020-08-05 09:59:49 +02:00
xen-netfront.c xen-netfront: fix potential deadlock in xennet_remove() 2020-08-05 09:59:51 +02:00