android_kernel_oneplus_msm8998/drivers/net/ethernet
Tyrel Datwyler ba2f5c1805 ibmveth: fix DMA unmap error in ibmveth_xmit_start error path
[ Upstream commit 756af9c642329d54f048bac2a62f829b391f6944 ]

Commit 33a48ab105 ("ibmveth: Fix DMA unmap error") fixed an issue in the
normal code path of ibmveth_xmit_start() that was originally introduced by
Commit 6e8ab30ec6 ("ibmveth: Add scatter-gather support"). This original
fix missed the error path where dma_unmap_page is wrongly called on the
header portion in descs[0] which was mapped with dma_map_single. As a
result a failure to DMA map any of the frags results in a dmesg warning
when CONFIG_DMA_API_DEBUG is enabled.

------------[ cut here ]------------
DMA-API: ibmveth 30000002: device driver frees DMA memory with wrong function
  [device address=0x000000000a430000] [size=172 bytes] [mapped as page] [unmapped as single]
WARNING: CPU: 1 PID: 8426 at kernel/dma/debug.c:1085 check_unmap+0x4fc/0xe10
...
<snip>
...
DMA-API: Mapped at:
ibmveth_start_xmit+0x30c/0xb60
dev_hard_start_xmit+0x100/0x450
sch_direct_xmit+0x224/0x490
__qdisc_run+0x20c/0x980
__dev_queue_xmit+0x1bc/0xf20

This fixes the API misuse by unampping descs[0] with dma_unmap_single.

Fixes: 6e8ab30ec6 ("ibmveth: Add scatter-gather support")
Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-13 10:05:27 +01:00
..
3com net: prevent ISA drivers from building on PPC32 2018-09-05 09:18:35 +02:00
8390
adaptec
adi
aeroflex
agere
allwinner
alteon
altera
amd net: amd: add missing of_node_put() 2018-12-13 09:21:35 +01:00
apm drivers: net: xgene: Fix hardware checksum setting 2018-03-22 09:23:20 +01:00
apple
arc net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred 2018-03-31 18:12:33 +02:00
atheros atl1c: reserve min skb headroom 2018-09-05 09:18:35 +02:00
aurora
broadcom bnx2x: Assign unique DMAE channel number for FW DMAE transactions. 2018-12-13 09:21:34 +01:00
brocade bna: ethtool: Avoid reading past end of buffer 2018-11-21 09:27:41 +01:00
cadence net: macb: disable scatter-gather for macb on sama5d3 2018-10-20 09:52:33 +02:00
calxeda
cavium net: thunderx: fix NULL pointer dereference in nic_remove 2018-12-17 21:55:11 +01:00
chelsio net: cxgb3_main: fix a missing-check bug 2018-11-10 07:41:34 -08:00
cirrus net: prevent ISA drivers from building on PPC32 2018-09-05 09:18:35 +02:00
cisco enic: do not call enic_change_mtu in enic_probe 2018-09-15 09:40:40 +02:00
davicom
dec drivers/net: fix eisa_driver probe section mismatch 2018-02-25 11:03:44 +01:00
dlink
emulex
ezchip
faraday net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts 2018-12-13 09:21:35 +01:00
freescale gianfar: Fix Rx byte accounting for ndev stats 2018-05-30 07:49:02 +02:00
fujitsu
hisilicon net: hisilicon: remove unexpected free_netdev 2018-12-17 21:55:11 +01:00
hp net: hp100: fix always-true check for link up state 2018-09-29 03:08:52 -07:00
i825xx
ibm ibmveth: fix DMA unmap error in ibmveth_xmit_start error path 2019-01-13 10:05:27 +01:00
intel ixgbe: recognize 1000BaseLX SFP modules as 1Gbps 2018-12-17 21:55:11 +01:00
marvell net: mvpp2: Extract the correct ethtype from the skb for tx csum offload 2018-10-20 09:52:36 +02:00
mellanox net/mlx4: Fix UBSAN warning of signed integer overflow 2018-12-13 09:21:35 +01:00
micrel
microchip
moxa
myricom
natsemi net/sonic: Use dma_mapping_error() 2018-07-03 11:21:24 +02:00
neterion
nuvoton
nvidia
nxp
octeon
oki-semi
packetengines
pasemi
qlogic qed: Fix reading wrong value in loop condition 2018-12-13 09:21:35 +01:00
qualcomm net: qca_spi: Fix log level if probe fails 2018-08-24 13:27:00 +02:00
rdc
realtek net: 8139cp: fix a BUG triggered by changing mtu with network traffic 2018-12-17 21:55:08 +01:00
renesas sh_eth: Use platform device for printing before register_netdev() 2018-04-13 19:50:08 +02:00
rocker rocker: fix rocker_tlv_put_* functions for KASAN 2018-12-17 21:55:17 +01:00
samsung
seeq
sfc sfc: don't warn on successful change of MAC 2017-12-20 10:04:57 +01:00
sgi
silan
sis
smsc
stmicro net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules 2018-11-10 07:41:41 -08:00
sun net: sungem: fix rx checksum support 2018-07-22 14:25:52 +02:00
synopsys
tehuti
ti drivers: net: cpsw: fix segfault in case of bad phy-handle 2018-09-26 08:35:10 +02:00
tile
toshiba
tundra
via
wiznet
xilinx net: axienet: Fix double deregister of mdio 2018-09-05 09:18:35 +02:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
Makefile
netx-eth.c