Shubhrajyoti Datta
88adb09fe8
net: axienet: Fix double deregister of mdio
[ Upstream commit 03bc7cab7d ]
If the registration fails then mdio_unregister is called.
However at unbind the unregister ia attempted again resulting
in the below crash
[ 73.544038] kernel BUG at drivers/net/phy/mdio_bus.c:415!
[ 73.549362] Internal error: Oops - BUG: 0 [#1] SMP
[ 73.554127] Modules linked in:
[ 73.557168] CPU: 0 PID: 2249 Comm: sh Not tainted 4.14.0 #183
[ 73.562895] Hardware name: xlnx,zynqmp (DT)
[ 73.567062] task: ffffffc879e41180 task.stack: ffffff800cbe0000
[ 73.572973] PC is at mdiobus_unregister+0x84/0x88
[ 73.577656] LR is at axienet_mdio_teardown+0x18/0x30
[ 73.582601] pc : [<ffffff80085fa4cc>] lr : [<ffffff8008616858>]
pstate: 20000145
[ 73.589981] sp : ffffff800cbe3c30
[ 73.593277] x29: ffffff800cbe3c30 x28: ffffffc879e41180
[ 73.598573] x27: ffffff8008a21000 x26: 0000000000000040
[ 73.603868] x25: 0000000000000124 x24: ffffffc879efe920
[ 73.609164] x23: 0000000000000060 x22: ffffffc879e02000
[ 73.614459] x21: ffffffc879e02800 x20: ffffffc87b0b8870
[ 73.619754] x19: ffffffc879e02800 x18: 000000000000025d
[ 73.625050] x17: 0000007f9a719ad0 x16: ffffff8008195bd8
[ 73.630345] x15: 0000007f9a6b3d00 x14: 0000000000000010
[ 73.635640] x13: 74656e7265687465 x12: 0000000000000030
[ 73.640935] x11: 0000000000000030 x10: 0101010101010101
[ 73.646231] x9 : 241f394f42533300 x8 : ffffffc8799f6e98
[ 73.651526] x7 : ffffffc8799f6f18 x6 : ffffffc87b0ba318
[ 73.656822] x5 : ffffffc87b0ba498 x4 : 0000000000000000
[ 73.662117] x3 : 0000000000000000 x2 : 0000000000000008
[ 73.667412] x1 : 0000000000000004 x0 : ffffffc8799f4000
[ 73.672708] Process sh (pid: 2249, stack limit = 0xffffff800cbe0000)
Fix the same by making the bus NULL on unregister.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-05 09:20:02 +02:00
..
2018-08-24 13:12:38 +02:00
2018-05-01 15:13:08 -07:00
2018-02-28 10:18:33 +01:00
2018-08-24 13:12:28 +02:00
2018-07-22 14:27:36 +02:00
2018-02-13 12:35:55 +01:00
2018-08-15 18:14:45 +02:00
2018-07-17 11:37:54 +02:00
2018-08-03 07:55:16 +02:00
2018-08-03 07:55:19 +02:00
2018-05-30 07:50:47 +02:00
2018-08-15 18:14:41 +02:00
2018-07-03 11:23:13 +02:00
2018-05-30 07:50:32 +02:00
2018-06-26 08:08:08 +08:00
2018-07-03 11:23:08 +02:00
2018-08-06 16:23:04 +02:00
2018-02-28 10:18:33 +01:00
2018-04-13 19:48:09 +02:00
2018-08-24 13:12:33 +02:00
2018-06-06 16:44:33 +02:00
2018-08-03 07:55:21 +02:00
2018-05-30 07:50:18 +02:00
2018-05-30 07:50:24 +02:00
2018-06-16 09:52:33 +02:00
2018-09-05 09:20:00 +02:00
2018-08-24 13:12:35 +02:00
2018-03-24 11:00:12 +01:00
2018-04-20 08:20:41 +02:00
2018-05-30 07:50:46 +02:00
2018-06-06 16:44:38 +02:00
2018-09-05 09:20:01 +02:00
2018-05-30 07:50:47 +02:00
2018-02-25 11:05:55 +01:00
2018-08-24 13:12:31 +02:00
2018-08-24 13:12:38 +02:00
2018-08-03 07:55:11 +02:00
2018-05-30 07:50:20 +02:00
2018-06-06 16:44:35 +02:00
2018-08-22 07:47:14 +02:00
2018-04-13 19:48:03 +02:00
2018-05-30 07:50:42 +02:00
2018-08-24 13:12:33 +02:00
2018-08-03 07:55:26 +02:00
2018-08-03 07:55:24 +02:00
2018-05-25 16:13:06 +02:00
2018-08-03 07:55:16 +02:00
2018-07-17 11:37:51 +02:00
2018-08-03 07:55:24 +02:00
2018-08-15 18:14:43 +02:00
2018-09-05 09:20:02 +02:00
2018-08-24 13:12:32 +02:00
2018-05-30 07:50:22 +02:00
2018-07-03 11:23:13 +02:00
2018-08-24 13:12:30 +02:00
2018-08-03 07:55:22 +02:00
2018-07-03 11:23:08 +02:00
2018-05-30 07:50:43 +02:00
2018-04-08 12:12:57 +02:00
2018-08-24 13:12:43 +02:00
2018-03-22 09:17:51 +01:00
2018-01-23 19:57:07 +01:00
2018-08-24 13:12:39 +02:00
2018-06-26 08:08:05 +08:00
2018-04-29 11:31:56 +02:00
2018-04-13 19:47:56 +02:00
2018-07-25 11:24:01 +02:00
2018-07-03 11:23:16 +02:00
2017-12-14 09:28:22 +01:00
2018-08-03 07:55:20 +02:00
2018-07-03 11:23:13 +02:00
2018-08-03 07:55:13 +02:00
2018-07-03 11:23:12 +02:00
2018-09-05 09:20:00 +02:00
2018-05-30 07:50:47 +02:00
2018-05-30 07:50:45 +02:00
2018-09-05 09:20:01 +02:00
2018-03-24 11:00:20 +01:00
2018-08-03 07:55:23 +02:00
2018-04-24 09:34:12 +02:00
2018-08-22 07:47:15 +02:00
2018-04-13 19:47:59 +02:00
2018-09-05 09:20:00 +02:00
2018-08-03 07:55:13 +02:00
2018-07-22 14:27:38 +02:00
2018-07-03 11:23:16 +02:00
2018-08-06 16:23:04 +02:00
2018-07-03 11:23:06 +02:00
2018-05-30 07:50:34 +02:00
2018-08-24 13:12:29 +02:00
2018-05-30 07:50:44 +02:00
2018-02-25 11:05:45 +01:00