linux/drivers/net/ethernet
Sergei Shtylyov b61ed8fdd8 sh_eth: fix WARNING in dma_common_free_remap()
Iff the first dma_alloc_coherent()  call fails in sh_eth_ring_init(), the
following  is printed to the kernel console:

WARNING: CPU: 0 PID: 1 at drivers/base/dma-mapping.c:334 dma_common_free_remap+0x48/0x6c()
trying to free invalid coherent area:   (null)
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.3.0-rc7-dirty #969
Hardware name: Generic R8A7791 (Flattened Device Tree)
Backtrace:
[<c0013820>] (dump_backtrace) from [<c00139bc>] (show_stack+0x18/0x1c)
 r6:c0662856 r5:00000009 r4:00000000 r3:00204140
[<c00139a4>] (show_stack) from [<c0227510>] (dump_stack+0x74/0x90)
[<c022749c>] (dump_stack) from [<c0026ef4>] (warn_slowpath_common+0x8c/0xb8)
 r4:ee84dce0 r3:c0712774
[<c0026e68>] (warn_slowpath_common) from [<c0026fc4>] (warn_slowpath_fmt+0x38/0x40)
 r8:ee7f8000 r7:c0734520 r6:00001000 r5:20000008 r4:00000000
[<c0026f90>] (warn_slowpath_fmt) from [<c02df404>] (dma_common_free_remap+0x48/0x6c)
 r3:00000000 r2:c0662871
[<c02df3bc>] (dma_common_free_remap) from [<c001b9fc>] (__arm_dma_free+0xb8/0xd4)
r6:00000001 r5:00000000 r4:00001000 r3:ee8c5584
[<c001b944>] (__arm_dma_free) from [<c001ba68>] (arm_dma_free+0x24/0x2c)
 r10:0000016b r8:00000000 r7:ee9bc830 r6:00000000 r5:00000400 r4:ee9bc800
[<c001ba44>] (arm_dma_free) from [<c032ebf0>] (sh_eth_ring_init+0x110/0x138)
[<c032eae0>] (sh_eth_ring_init) from [<c033179c>] (sh_eth_open+0x94/0x1f4)
 r6:00000000 r5:ee9bcd18 r4:ee9bc800
[<c0331708>] (sh_eth_open) from [<c041bf7c>] (__dev_open+0x84/0x104)
 r6:c0565c50 r5:00000000 r4:ee9bc800
[<c041bef8>] (__dev_open) from [<c041c208>] (__dev_change_flags+0x94/0x13c)
 r7:00001002 r6:00000001 r5:00001003 r4:ee9bc800
[<c041c174>] (__dev_change_flags) from [<c041c2e8>] (dev_change_flags+0x20/0x50)
 r7:c072c8a0 r6:00000138 r5:00001002 r4:ee9bc800
[<c041c2c8>] (dev_change_flags) from [<c06e8d4c>] (ip_auto_config+0x174/0xf7c)
 r8:00001002 r7:c072c8a0 r6:c0700040 r5:00000001 r4:ee9bc800 r3:00000101
[<c06e8bd8>] (ip_auto_config) from [<c000a810>] (do_one_initcall+0x100/0x1c8)
 r10:c06f883c r9:00000000 r8:c06e8bd8 r7:c0734000 r6:c070e918 r5:c070e918
 r4:ee083640
[<c000a710>] (do_one_initcall) from [<c06c9ddc>] (kernel_init_freeable+0x11c/0x1ec)
 r10:c06f883c r9:00000000 r8:00000099 r7:c0734000 r6:c070372c r5:c06f8834
 r4:00000007
[<c06c9cc0>] (kernel_init_freeable) from [<c0514d78>] (kernel_init+0x14/0xec)
 r10:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0514d64 r4:c0734000
[<c0514d64>] (kernel_init) from [<c0010458>] (ret_from_fork+0x14/0x3c)
 r4:00000000 r3:ee84c000

This is because the code jumps to a wrong label and so tries to free yet
unallocated coherent memory.  Fix the *goto* in question.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02 15:56:11 -05:00
..
3com 3c59x: Add BQL support for 3c59x ethernet driver. 2015-08-24 12:20:58 -07:00
8390
adaptec
adi
aeroflex
agere
allwinner net: sun4i-emac: Properly free resources on probe failure and remove 2015-10-21 19:47:45 -07:00
alteon
altera net: eth: altera: Fix the initial device operstate 2015-09-09 12:10:15 -07:00
amd amd-xgbe: Fix race between access of desc and desc index 2015-10-27 19:49:22 -07:00
apm net: fix phy refcounting in a bunch of drivers 2015-09-24 23:04:53 -07:00
apple
arc net: arc: Fix module autoload for OF platform driver 2015-09-21 16:08:20 -07:00
atheros net: atl1c: add BQL support 2015-08-12 16:27:40 -07:00
broadcom net: bcmgenet: Software reset EPHY after power on 2015-11-01 15:54:50 -05:00
brocade bna: fix error handling 2015-09-29 13:49:53 -07:00
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-31 23:52:20 -07:00
calxeda
cavium net: thunderx: add missing of_node_put 2015-10-26 22:08:07 -07:00
chelsio cxgb4: add device ID for few T5 adapters 2015-09-17 16:24:51 -07:00
cirrus
cisco flow_dissector: Add flags argument to skb_flow_dissector functions 2015-09-01 15:06:22 -07:00
davicom dm9000: fix a typo 2015-09-08 22:44:42 -07:00
dec
dlink
emulex be2net: remove vlan promisc capability from VF's profile descriptors 2015-10-13 04:32:45 -07:00
ezchip NET: nps_enet: minor namespace cleanup 2015-08-23 16:08:54 -07:00
faraday
freescale fec: Use gpio_set_value_cansleep() 2015-11-01 12:03:01 -05:00
fujitsu
hisilicon net: hisilicon: fix handling platform_get_irq result 2015-09-26 22:46:45 -07:00
hp
i825xx
ibm net/ibm/emac: bump version numbers for correct work with ethtool 2015-09-28 22:22:50 -07:00
icplus
intel i40e: fix annoying message 2015-10-22 18:06:18 -07:00
marvell net: mv643xx_eth: add missing of_node_put 2015-10-26 22:08:15 -07:00
mellanox net/mlx4: Copy/set only sizeof struct mlx4_eqe bytes 2015-10-27 20:27:11 -07:00
micrel net: ks8851: Export OF module alias information 2015-09-17 21:24:02 -07:00
microchip
moxa net: moxa: Fix module autoload for OF platform driver 2015-09-21 16:09:02 -07:00
myricom
natsemi
neterion neterion: s2io: Use module_pci_driver 2015-07-09 00:19:00 -07:00
nuvoton
nvidia forcedeth: fix unilateral interrupt disabling in netpoll path 2015-10-27 19:45:23 -07:00
nxp net: lpc_eth: fix warnings caused by enabling unprepared clock 2015-10-05 03:41:12 -07:00
octeon
oki-semi
packetengines
pasemi
qlogic qlcnic: track vxlan port count 2015-09-17 22:32:16 -07:00
qualcomm
rdc
realtek r8169: fix handling rtl_readphy result 2015-09-26 22:48:32 -07:00
renesas sh_eth: fix WARNING in dma_common_free_remap() 2015-11-02 15:56:11 -05:00
rocker rocker: use change upper info 2015-08-27 16:28:35 -07:00
samsung
seeq
sfc sfc: Allow driver to cope with a lower number of VIs than it needs for RSS 2015-08-28 13:53:47 -07:00
sgi
silan
sis
smsc net: smsc911x: Fix crash if loopback test fails 2015-11-01 12:05:24 -05:00
stmicro stmmac: Correctly report PTP capabilities. 2015-11-01 17:05:43 -05:00
sun sunvnet: Invoke SET_NETDEV_DEV() to set up the vdev in vnet_new() 2015-09-21 16:28:36 -07:00
synopsys ethernet: synopsys: SYNOPSYS_DWC_ETH_QOS should depend on HAS_DMA 2015-09-06 19:48:53 -07:00
tehuti
ti net: netcp: add missing of_node_put 2015-10-26 22:08:10 -07:00
tile nohz: Prevent tilegx network driver interrupts 2015-07-29 15:44:59 +02:00
toshiba
tundra
via via-rhine: fix VLAN receive handling regression. 2015-10-16 00:55:30 -07:00
wiznet
xilinx net: fix phy refcounting in a bunch of drivers 2015-09-24 23:04:53 -07:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c net: ec_bhf: Use module_pci_driver 2015-07-08 16:04:06 -07:00
ethoc.c net: ethoc: Remove unnecessary #ifdef CONFIG_OF 2015-09-09 14:16:05 -07:00
fealnx.c
jme.c net: jme: use kzalloc() instead of kmalloc+memset 2015-09-09 17:06:00 -07:00
jme.h
Kconfig dwc_eth_qos: Add the synopsys folder to the build system. 2015-07-28 23:55:00 -07:00
korina.c
lantiq_etop.c
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-08-27 21:45:31 -07:00
netx-eth.c