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
..
2015-10-14 22:48:13 +02:00
2015-09-10 13:29:01 -07:00
2015-09-03 16:55:55 -07:00
2015-09-17 21:29:07 -07:00
2015-10-23 17:55:10 +09:00
2015-10-30 19:25:02 +01:00
2015-08-28 21:09:14 +02:00
2015-10-15 17:10:15 +02:00
2015-09-26 21:05:23 -04:00
2015-10-28 07:24:53 +09:00
2015-09-29 14:33:51 +02:00
2015-10-15 22:46:33 +02:00
2015-09-11 19:11:06 -07:00
2015-09-26 21:05:23 -04:00
2015-10-02 11:05:58 +09:00
2015-10-02 14:46:15 -04:00
2015-09-11 16:21:12 -07:00
2015-09-21 15:07:19 +09:00
2015-10-01 12:51:28 +02:00
2015-09-18 08:11:42 -07:00
2015-10-25 05:02:33 +10:00
2015-09-04 12:02:11 -07:00
2015-09-10 13:29:01 -07:00
2015-09-20 22:44:51 -07:00
2015-09-20 17:50:19 -07:00
2015-10-23 22:26:28 +02:00
2015-09-10 14:03:44 -04:00
2015-10-03 10:27:18 +01:00
2015-10-24 07:28:05 +09:00
2015-10-30 18:49:44 -07:00
2015-10-27 07:44:13 +09:00
2015-10-04 11:40:09 +01:00
2015-10-22 07:23:19 -07:00
2015-09-17 10:02:20 +02:00
2015-09-03 16:41:38 -07:00
2015-09-05 18:11:04 -07:00
2015-10-05 05:10:01 +01:00
2015-10-27 07:41:48 +09:00
2015-10-22 15:48:28 -02:00
2015-10-12 16:23:34 -07:00
2015-08-26 07:11:45 -07:00
2015-10-01 16:31:42 +01:00
2015-10-16 12:07:43 -07:00
2015-10-21 10:18:11 +02:00
2015-10-07 09:35:15 +01:00
2015-11-02 15:56:11 -05:00
2015-09-04 10:07:45 -07:00
2015-09-07 15:27:12 -04:00
2015-09-17 11:49:28 -04:00
2015-10-04 12:09:43 +01:00
2015-09-26 06:01:33 -04:00
2015-09-15 13:18:04 -05:00
2015-10-30 18:47:18 -07:00
2015-09-03 16:01:03 +01:00
2015-10-15 17:11:23 +02:00
2015-09-25 17:01:14 +05:30
2015-10-02 04:06:26 -07:00
2015-09-17 21:41:02 -07:00
2015-09-17 12:25:42 -07:00
2015-08-29 01:46:40 +02:00
2015-09-09 10:55:32 -07:00
2015-10-06 12:00:42 +01:00
2015-09-01 14:48:40 +02:00
2015-09-05 19:37:31 +02:00
2015-09-18 09:28:20 -07:00
2015-10-11 10:02:30 -07:00
2015-09-21 12:02:27 -07:00
2015-09-16 15:47:51 +02:00
2015-10-07 11:43:39 +01:00
2015-09-16 15:47:51 +02:00
2015-10-24 07:51:13 +09:00
2015-09-24 23:24:46 -07:00
2015-10-21 17:02:13 +02:00
2015-09-20 15:20:11 -07:00
2015-10-17 21:24:46 -07:00
2015-10-17 00:04:18 -07:00
2015-10-27 20:17:03 -07:00
2015-10-17 22:00:39 -07:00
2015-09-08 13:32:11 +03:00
2015-09-01 18:46:42 -07:00
2015-09-28 10:56:10 +02:00
2015-09-10 18:19:42 -07:00
2015-09-03 16:27:01 -07:00
2015-09-04 10:22:09 -07:00