Fabio Estevam
3169134478
fec: Fix inconsistent lock state
...
fec_restart() runs in softirq context and we should use the
netif_tx_lock_bh/netif_tx_unlock_bh() variants to avoid the following warning
that happens since commit 54309fa6 ("net: fec: fix kernel oops when plug/unplug
cable many times"):
[ 9.753168] =================================
[ 9.757540] [ INFO: inconsistent lock state ]
[ 9.761921] 3.10.0-rc1-next-20130514 #13 Not tainted
[ 9.766897] ---------------------------------
[ 9.771264] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
[ 9.777288] swapper/0 [HC0[0]:SC1[3]:HE1:SE0] takes:
[ 9.782261] (_xmit_ETHER#2){+.?...}, at: [<c03c24a4>] sch_direct_xmit+0xa0/0x2d4
[ 9.789879] {SOFTIRQ-ON-W} state was registered at:
[ 9.794769] [<c0059c60>] __lock_acquire+0x528/0x1bc0
[ 9.799953] [<c005b838>] lock_acquire+0xa0/0x108
[ 9.804780] [<c0441320>] _raw_spin_lock+0x28/0x38
[ 9.809702] [<c02f9fc8>] fec_restart+0x5d0/0x664
[ 9.814542] [<c02fa738>] fec_enet_adjust_link+0xa8/0xc0
[ 9.819978] [<c02f7a28>] phy_state_machine+0x2fc/0x370
[ 9.825323] [<c0035ee0>] process_one_work+0x1c0/0x4a0
[ 9.830589] [<c0036594>] worker_thread+0x138/0x394
[ 9.835587] [<c003c620>] kthread+0xa4/0xb0
[ 9.839890] [<c000e820>] ret_from_fork+0x14/0x34
[ 9.844728] irq event stamp: 185984
[ 9.848226] hardirqs last enabled at (185984): [<c00232b0>] local_bh_enable_ip+0x84/0xf0
[ 9.856450] hardirqs last disabled at (185983): [<c0023270>] local_bh_enable_ip+0x44/0xf0
[ 9.864667] softirqs last enabled at (185966): [<c0023470>] irq_enter+0x64/0x68
[ 9.872099] softirqs last disabled at (185967): [<c0023510>] irq_exit+0x9c/0xd8
[ 9.879440]
[ 9.879440] other info that might help us debug this:
[ 9.885981] Possible unsafe locking scenario:
[ 9.885981]
[ 9.891912] CPU0
[ 9.894364] ----
[ 9.896814] lock(_xmit_ETHER#2);
[ 9.900259] <Interrupt>
[ 9.902884] lock(_xmit_ETHER#2);
[ 9.906500]
[ 9.906500] *** DEADLOCK ***
Reported-by: Shawn Guo <shawn.guo@linaro.org>
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-15 14:42:15 -07:00
..
2013-05-11 17:40:14 -07:00
2013-04-29 11:18:34 -07:00
2013-04-19 14:46:06 -04:00
2013-05-08 13:13:30 -07:00
2013-03-17 12:50:24 -04:00
2013-04-19 14:46:06 -04:00
2013-05-01 14:08:52 -07:00
2013-03-15 08:56:58 -04:00
2013-05-01 14:08:52 -07:00
2013-05-14 11:32:04 -07:00
2013-05-13 12:54:38 -07:00
2013-05-14 13:04:02 -07:00
2013-05-11 16:28:23 -07:00
2013-05-03 16:10:34 -04:00
2013-03-29 15:40:24 -04:00
2013-04-19 14:46:06 -04:00
2013-04-01 13:36:50 -04:00
2013-03-20 12:46:26 -04:00
2013-03-09 16:09:19 -05:00
2013-05-14 11:32:04 -07:00
2013-03-18 13:02:37 -04:00
2013-05-15 14:42:15 -07:00
2013-05-01 14:08:52 -07:00
2012-12-07 14:22:22 -05:00
2013-03-09 16:09:19 -05:00
2013-05-11 17:40:14 -07:00
2013-05-15 14:42:14 -07:00
2013-05-07 07:51:37 -07:00
2013-05-14 11:32:05 -07:00
2013-05-11 16:12:44 -07:00
2013-04-16 16:30:51 -04:00
2013-04-07 16:48:19 -04:00
2013-04-19 14:46:06 -04:00
2013-04-19 14:46:06 -04:00
2013-04-19 14:46:06 -04:00
2013-03-15 08:56:58 -04:00
2013-04-19 14:46:06 -04:00
2013-04-02 16:43:56 -04:00
2013-01-06 21:06:31 -08:00
2013-04-16 16:43:35 -04:00
2013-02-21 12:05:51 -08:00
2013-03-17 12:50:24 -04:00
2013-05-13 12:54:38 -07:00
2013-03-09 16:09:19 -05:00
2013-04-30 03:55:20 -04:00
2013-04-30 15:37:08 -04:00
2013-03-09 16:09:19 -05:00
2013-05-14 11:32:04 -07:00
2013-03-17 12:50:24 -04:00
2013-02-21 12:05:51 -08:00
2013-04-15 14:11:37 -04:00
2013-05-02 08:56:55 -07:00
2013-05-11 16:28:23 -07:00
2013-03-28 01:20:42 -04:00
2013-04-19 14:46:06 -04:00
2013-05-02 16:52:04 -04:00
2013-05-02 16:20:31 -04:00
2013-05-08 13:13:29 -07:00
2013-03-17 12:50:24 -04:00
2013-04-19 14:46:06 -04:00
2013-03-26 12:47:17 -04:00
2013-04-19 14:45:26 -04:00
2013-05-01 14:08:52 -07:00
2013-01-14 15:11:50 -05:00
2013-01-14 15:11:50 -05:00
2013-01-29 14:07:05 -05:00
2012-12-07 14:22:22 -05:00
2013-04-19 14:46:06 -04:00
2013-01-22 10:39:52 -05:00
2013-01-06 21:06:31 -08:00
2013-03-21 11:50:10 -04:00
2013-01-22 10:39:52 -05:00
2013-03-09 16:09:19 -05:00
2013-03-22 10:23:42 -04:00