Commit 3eef855
net: stmmac: remove unneeded stmmac_poll_controller
Using netconsole netpoll_poll_dev could be called from interrupt
context, thus using disable_irq() would cause the following kernel
warning with CONFIG_DEBUG_ATOMIC_SLEEP enabled:
BUG: sleeping function called from invalid context at kernel/irq/manage.c:137
in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 10, name: ksoftirqd/0
CPU: 0 PID: 10 Comm: ksoftirqd/0 Tainted: G W 5.15.42-00075-g816b502b2298-dirty msm8953-mainline#117
Hardware name: aml (r1) (DT)
Call trace:
dump_backtrace+0x0/0x270
show_stack+0x14/0x20
dump_stack_lvl+0x8c/0xac
dump_stack+0x18/0x30
___might_sleep+0x150/0x194
__might_sleep+0x64/0xbc
synchronize_irq+0x8c/0x150
disable_irq+0x2c/0x40
stmmac_poll_controller+0x140/0x1a0
netpoll_poll_dev+0x6c/0x220
netpoll_send_skb+0x308/0x390
netpoll_send_udp+0x418/0x760
write_msg+0x118/0x140 [netconsole]
console_unlock+0x404/0x500
vprintk_emit+0x118/0x250
dev_vprintk_emit+0x19c/0x1cc
dev_printk_emit+0x90/0xa8
__dev_printk+0x78/0x9c
_dev_warn+0xa4/0xbc
ath10k_warn+0xe8/0xf0 [ath10k_core]
ath10k_htt_txrx_compl_task+0x790/0x7fc [ath10k_core]
ath10k_pci_napi_poll+0x98/0x1f4 [ath10k_pci]
__napi_poll+0x58/0x1f4
net_rx_action+0x504/0x590
_stext+0x1b8/0x418
run_ksoftirqd+0x74/0xa4
smpboot_thread_fn+0x210/0x3c0
kthread+0x1fc/0x210
ret_from_fork+0x10/0x20
Since [0] .ndo_poll_controller is only needed if driver doesn't or
partially use NAPI. Because stmmac does so, stmmac_poll_controller
can be removed fixing the above warning.
[0] commit ac3d9dd ("netpoll: make ndo_poll_controller() optional")
Cc: <[email protected]> # 5.15.x
Fixes: 47dd7a5 ("net: add support for STMicroelectronics Ethernet controllers")
Signed-off-by: Remi Pommarel <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/1c156a6d8c9170bd6a17825f2277115525b4d50f.1696429960.git.repk@triplefau.lt
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 566aeed commit 3eef855
1 file changed
Lines changed: 0 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6002 | 6002 | | |
6003 | 6003 | | |
6004 | 6004 | | |
6005 | | - | |
6006 | | - | |
6007 | | - | |
6008 | | - | |
6009 | | - | |
6010 | | - | |
6011 | | - | |
6012 | | - | |
6013 | | - | |
6014 | | - | |
6015 | | - | |
6016 | | - | |
6017 | | - | |
6018 | | - | |
6019 | | - | |
6020 | | - | |
6021 | | - | |
6022 | | - | |
6023 | | - | |
6024 | | - | |
6025 | | - | |
6026 | | - | |
6027 | | - | |
6028 | | - | |
6029 | | - | |
6030 | | - | |
6031 | | - | |
6032 | 6005 | | |
6033 | 6006 | | |
6034 | 6007 | | |
| |||
6989 | 6962 | | |
6990 | 6963 | | |
6991 | 6964 | | |
6992 | | - | |
6993 | | - | |
6994 | | - | |
6995 | 6965 | | |
6996 | 6966 | | |
6997 | 6967 | | |
| |||
0 commit comments