openwrt/target/linux
Koen Vandeputte 6ced31c320 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:30:41 +02:00
..
apm821xx kernel: bump 4.19 to 4.19.64 2019-08-06 11:52:47 +02:00
ar7 kernel: bump 4.9 to 4.9.186 2019-07-31 16:51:46 +02:00
ar71xx ar71xx/ath79: ag71xx: fix sleep in atomic 2019-08-09 18:30:41 +02:00
arc770
archs38
armvirt armvirt: fix overlay support by updating to f2fs/ext4 based overlays 2019-06-25 14:12:22 +00:00
at91 at91: split up DEVICE_TITLE 2019-08-02 22:45:33 +02:00
ath25 ath25: split up DEVICE_TITLE 2019-07-10 16:56:16 +02:00
ath79 ar71xx/ath79: ag71xx: fix sleep in atomic 2019-08-09 18:30:41 +02:00
bcm53xx bcm53xx: split up DEVICE_TITLE 2019-08-02 22:45:02 +02:00
brcm47xx kernel: bump 4.19 to 4.19.62 2019-07-31 16:51:46 +02:00
brcm63xx kernel: bump 4.14 to 4.14.137 2019-08-09 18:30:29 +02:00
brcm2708 kernel: bump 4.19 to 4.19.65 2019-08-09 18:30:33 +02:00
cns3xxx treewide: sysupgrade: don't use $ARGV in platform_do_upgrade() 2019-07-17 08:05:38 +02:00
gemini gemini: split up DEVICE_TITLE 2019-08-02 22:45:02 +02:00
generic kernel: bump 4.19 to 4.19.65 2019-08-09 18:30:33 +02:00
imx6 imx6: bump SDMA firmware to 3.5 2019-07-31 16:51:46 +02:00
ipq40xx kernel: bump 4.14 to 4.14.136 2019-08-06 11:52:47 +02:00
ipq806x ipq806x: split up DEVICE_TITLE 2019-08-02 22:45:02 +02:00
ixp4xx kernel: bump 4.9 to 4.9.187 2019-08-06 11:52:47 +02:00
kirkwood treewide: sysupgrade: don't use $ARGV in platform_do_upgrade() 2019-07-17 08:05:38 +02:00
lantiq kernel: bump 4.19 to 4.19.62 2019-07-31 16:51:46 +02:00
layerscape kernel: bump 4.14 to 4.14.136 2019-08-06 11:52:47 +02:00
malta malta: fix overlay support by updating to f2fs/ext4 based overlays 2019-06-25 14:12:22 +00:00
mediatek kernel: bump 4.19 to 4.19.64 2019-08-06 11:52:47 +02:00
mpc85xx mpc85xx: correct OCEDO Panda LED definition 2019-08-05 22:37:46 +02:00
mvebu kernel: bump 4.14 to 4.14.136 2019-08-06 11:52:47 +02:00
mxs mxs: disable unused serial drivers 2019-03-11 19:35:43 +01:00
octeon octeon: split up DEVICE_TITLE 2019-08-02 22:45:02 +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
orion orion: sysupgrade: change platform_check_image() args validation 2019-07-16 13:58:26 +02:00
oxnas oxnas: convert DEVICE_TITLE to new variables 2019-07-10 16:56:16 +02:00
pistachio treewide: sysupgrade: get rid of platform_nand_pre_upgrade() 2019-07-22 14:27:37 +02:00
ramips ramips: add support for HiWiFi HC5761A 2019-08-08 21:02:03 +08:00
rb532 treewide: sysupgrade: get rid of platform_nand_pre_upgrade() 2019-07-22 14:27:37 +02:00
samsung kernel: Do not set CONFIG_DEVMEM or CONFIG_DEVKMEM 2019-05-11 17:15:41 +02:00
sunxi sunxi: convert to multi-variable device title 2019-07-10 17:01:13 +02:00
tegra tegra: split up DEVICE_TITLE 2019-07-15 19:28:55 +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-17 12:16:29 +02:00
zynq zynq: convert to multi-variable device title 2019-07-08 16:28:47 +02:00
Makefile