openwrt/target/linux
Koen Vandeputte dda342abba ar71xx/ath79: ag71xx: fix sleep in atomic
When enabling atomic-sleep-debugging options in the kernel,
following splat is seen when disabling the interface (which happens on boot):

[   10.892878] eth0: link down
[   10.896788] BUG: sleeping function called from invalid context at net/core/dev.c:5563
[   10.904730] in_atomic(): 1, irqs_disabled(): 1, pid: 425, name: ip
[   10.911004] 2 locks held by ip/425:
[   10.914539]  #0:  (rtnl_mutex){....}, at: [<80377474>] rtnetlink_rcv_msg+0x2d8/0x380
[   10.922441]  #1:  (&(&ag->lock)->rlock){....}, at: [<80330158>] ag71xx_hw_disable+0x24/0x94
[   10.930976] CPU: 0 PID: 425 Comm: ip Not tainted 4.14.136 #0
[   10.936716] Stack : 805e0000 80589228 80557404 876998ec 80610000 80610000 87cdcafc 805b5327
[   10.945233]         80551534 000001a9 8061386c 87699ccc 87cfb180 00000001 876998a0 84f70903
[   10.953751]         00000000 00000000 80b00000 8769979c 6a7407fa 00000000 00000007 00000000
[   10.962270]         000000b7 16d0954a 000000b6 00000000 80000000 87cb658c 87cb65b0 00000001
[   10.970787]         8046f97c 87699ccc 87cfb180 87ff2810 00000003 802ce724 0806e098 80610000
[   10.979306]         ...
[   10.981797] Call Trace:
[   10.984287] [<8006cb0c>] show_stack+0x58/0x100
[   10.988814] [<800aab34>] ___might_sleep+0x100/0x120
[   10.993774] [<8035c434>] napi_disable+0x30/0xd8
[   10.998377] [<80330198>] ag71xx_hw_disable+0x64/0x94
[   11.003418] [<8033069c>] ag71xx_stop+0x24/0x38
[   11.007959] [<80359e30>] __dev_close_many+0xcc/0x104
[   11.013009] [<80362eac>] __dev_change_flags+0xc8/0x1ac
[   11.018227] [<80362fb8>] dev_change_flags+0x28/0x70
[   11.023182] [<80376890>] do_setlink+0x31c/0x91c
[   11.027786] [<80379360>] rtnl_newlink+0x3ec/0x7f8
[   11.032563] [<80377498>] rtnetlink_rcv_msg+0x2fc/0x380
[   11.037799] [<8039a734>] netlink_rcv_skb+0xd4/0x178
[   11.042754] [<80399d10>] netlink_unicast+0x168/0x250
[   11.047796] [<8039a2d4>] netlink_sendmsg+0x3d8/0x434
[   11.052841] [<8033f0e4>] ___sys_sendmsg+0x1dc/0x290
[   11.057794] [<80340140>] __sys_sendmsg+0x54/0x84
[   11.062495] [<8007212c>] syscall_common+0x34/0x58

This is caused by calling napi_disable() while holding the spinlock.

Fix it by omitting the spinlock, which is not required here
Extensively tested on GL-MiFi, RB-912 and RB-922 hardware

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-08-09 18:32:38 +02:00
..
apm821xx kernel: bump 4.14 to 4.14.136 2019-08-06 11:54:50 +02:00
ar71xx ar71xx/ath79: ag71xx: fix sleep in atomic 2019-08-09 18:32:38 +02:00
arc770 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
archs38 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
armvirt kernel: Remove CONFIG_COMPAT 2019-05-11 17:15:41 +02:00
at91 at91:renaming subtraget legacy to sam9x 2019-05-30 12:12:57 +02:00
ath25 ath25: disable image generation for ubnt2 and ubnt5 devices 2019-07-20 08:57:23 +02:00
ath79 ar71xx/ath79: ag71xx: fix sleep in atomic 2019-08-09 18:32:38 +02:00
bcm53xx kernel: bump 4.14 to 4.14.125 (FS#2305 FS#2297) 2019-06-12 15:25:41 +02:00
brcm47xx kernel: bump 4.14 to 4.14.133 2019-07-12 09:39:33 +02:00
brcm63xx kernel: bump 4.14 to 4.14.137 2019-08-09 18:32:38 +02:00
brcm2708 kernel: bump 4.14 to 4.14.137 2019-08-09 18:32:38 +02:00
cns3xxx kernel: drop everything not on kernel version 4.14 2019-06-12 01:18:52 +02:00
gemini kernel: drop everything not on kernel version 4.14 2019-06-12 01:18:52 +02:00
generic kernel: bump 4.14 to 4.14.137 2019-08-09 18:32:38 +02:00
imx6 imx6: bump SDMA firmware to 3.5 2019-07-31 16:56:19 +02:00
ipq40xx kernel: bump 4.14 to 4.14.136 2019-08-06 11:54:50 +02:00
ipq806x kernel: bump 4.14 to 4.14.120 2019-05-21 09:45:15 +02:00
kirkwood kernel: drop everything not on kernel version 4.14 2019-06-12 01:18:52 +02:00
lantiq lantiq: enable STP where referenced 2019-07-03 11:17:29 +02:00
layerscape kernel: bump 4.14 to 4.14.136 2019-08-06 11:54:50 +02:00
malta malta: Deactivate MIPS O32 and N32 support 2019-05-14 21:50:42 +02:00
mediatek kernel: bump 4.14 to 4.14.136 2019-08-06 11:54:50 +02:00
mpc85xx mpc85xx: correct OCEDO Panda LED definition 2019-08-05 22:40:35 +02:00
mvebu kernel: bump 4.14 to 4.14.136 2019-08-06 11:54:50 +02:00
mxs mxs: disable unused serial drivers 2019-03-11 19:35:43 +01:00
octeon kernel: drop everything not on kernel version 4.14 2019-06-12 01:18:52 +02:00
octeontx kernel: Remove CONFIG_COMPAT 2019-05-11 17:15:41 +02:00
omap kernel: Deactivate CONFIG_BINFMT_MISC 2019-05-11 17:15:41 +02:00
oxnas kernel: bump 4.14 to 4.14.128 2019-06-20 15:50:00 +02:00
pistachio kernel: bump 4.14 to 4.14.91 2019-01-07 17:09:06 +01:00
ramips ramips: add support for ASUS RT-AC57U 2019-07-21 13:10:12 +02:00
rb532 kernel: bump 4.14 to 4.14.86 2018-12-10 11:48:44 +01:00
samsung kernel: Do not set CONFIG_DEVMEM or CONFIG_DEVKMEM 2019-05-11 17:15:41 +02:00
sunxi kernel: drop everything not on kernel version 4.14 2019-06-12 01:18:52 +02:00
tegra kernel: drop everything not on kernel version 4.14 2019-06-12 01:18:52 +02:00
uml kernel: Deactivate CONFIG_BINFMT_MISC 2019-05-11 17:15:41 +02:00
x86 x86: add modern network modules to Generic target 2019-07-20 22:58:08 +02:00
zynq zynq: make title consistent for all devices 2019-05-17 21:41:43 +02:00
Makefile