* [PATCH] ath10k: sdio: Add missing BH locking around napi_schdule()
@ 2021-08-24 14:43 Fabio Estevam
2021-08-31 18:21 ` Fabio Estevam
2021-09-28 14:36 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2021-08-24 14:43 UTC (permalink / raw)
To: kvalo
Cc: kuba, ath10k, linux-wireless, paulmck, marex, wgong, alagusankar,
erik.stromdahl, Fabio Estevam
On a i.MX-based board with a QCA9377 Wifi chip, the following errors
are seen after launching the 'hostapd' application:
hostapd /etc/wifi.conf
Configuration file: /etc/wifi.conf
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
Using interface wlan0 with hwaddr 00:1f:7b:31:04:a0 and ssid "thessid"
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan0: interface state COUNTRY_UPDATE->ENABLED
wlan0: AP-ENABLED
NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
...
Fix this problem by adding the BH locking around napi-schedule(),
in the same way it was done in commit e63052a5dd3c ("mlx5e: add
add missing BH locking around napi_schdule()").
Its commit log provides the following explanation:
"It's not correct to call napi_schedule() in pure process
context. Because we use __raise_softirq_irqoff() we require
callers to be in a context which will eventually lead to
softirq handling (hardirq, bh disabled, etc.).
With code as is users will see:
NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
"
Fixes: cfee8793a74d ("ath10k: enable napi on RX path for sdio")
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
drivers/net/wireless/ath/ath10k/sdio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
index b746052737e0..eb705214f3f0 100644
--- a/drivers/net/wireless/ath/ath10k/sdio.c
+++ b/drivers/net/wireless/ath/ath10k/sdio.c
@@ -1363,8 +1363,11 @@ static void ath10k_rx_indication_async_work(struct work_struct *work)
ep->ep_ops.ep_rx_complete(ar, skb);
}
- if (test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
+ if (test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) {
+ local_bh_disable();
napi_schedule(&ar->napi);
+ local_bh_enable();
+ }
}
static int ath10k_sdio_read_rtc_state(struct ath10k_sdio *ar_sdio, unsigned char *state)
--
2.25.1
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ath10k: sdio: Add missing BH locking around napi_schdule()
2021-08-24 14:43 [PATCH] ath10k: sdio: Add missing BH locking around napi_schdule() Fabio Estevam
@ 2021-08-31 18:21 ` Fabio Estevam
2021-09-28 14:36 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2021-08-31 18:21 UTC (permalink / raw)
To: Fabio Estevam, Kalle Valo
Cc: Jakub Kicinski, ath10k, linux-wireless, Paul E . McKenney,
Marek Vasut, wgong, alagusankar, erik.stromdahl
Hi Kalle,
On Tue, Aug 24, 2021 at 11:46 AM Fabio Estevam <festevam@denx.de> wrote:
>
> On a i.MX-based board with a QCA9377 Wifi chip, the following errors
> are seen after launching the 'hostapd' application:
>
> hostapd /etc/wifi.conf
> Configuration file: /etc/wifi.conf
> wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> Using interface wlan0 with hwaddr 00:1f:7b:31:04:a0 and ssid "thessid"
> IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
> wlan0: interface state COUNTRY_UPDATE->ENABLED
> wlan0: AP-ENABLED
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> ...
>
> Fix this problem by adding the BH locking around napi-schedule(),
> in the same way it was done in commit e63052a5dd3c ("mlx5e: add
> add missing BH locking around napi_schdule()").
>
> Its commit log provides the following explanation:
>
> "It's not correct to call napi_schedule() in pure process
> context. Because we use __raise_softirq_irqoff() we require
> callers to be in a context which will eventually lead to
> softirq handling (hardirq, bh disabled, etc.).
>
> With code as is users will see:
>
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> "
>
> Fixes: cfee8793a74d ("ath10k: enable napi on RX path for sdio")
> Signed-off-by: Fabio Estevam <festevam@denx.de>
Gentle ping on this one.
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ath10k: sdio: Add missing BH locking around napi_schdule()
2021-08-24 14:43 [PATCH] ath10k: sdio: Add missing BH locking around napi_schdule() Fabio Estevam
2021-08-31 18:21 ` Fabio Estevam
@ 2021-09-28 14:36 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-09-28 14:36 UTC (permalink / raw)
To: Fabio Estevam
Cc: kuba, ath10k, linux-wireless, paulmck, marex, wgong, alagusankar,
erik.stromdahl, Fabio Estevam
Fabio Estevam <festevam@denx.de> wrote:
> On a i.MX-based board with a QCA9377 Wifi chip, the following errors
> are seen after launching the 'hostapd' application:
>
> hostapd /etc/wifi.conf
> Configuration file: /etc/wifi.conf
> wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> Using interface wlan0 with hwaddr 00:1f:7b:31:04:a0 and ssid "thessid"
> IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
> wlan0: interface state COUNTRY_UPDATE->ENABLED
> wlan0: AP-ENABLED
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> ...
>
> Fix this problem by adding the BH locking around napi-schedule(),
> in the same way it was done in commit e63052a5dd3c ("mlx5e: add
> add missing BH locking around napi_schdule()").
>
> Its commit log provides the following explanation:
>
> "It's not correct to call napi_schedule() in pure process
> context. Because we use __raise_softirq_irqoff() we require
> callers to be in a context which will eventually lead to
> softirq handling (hardirq, bh disabled, etc.).
>
> With code as is users will see:
>
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> "
>
> Fixes: cfee8793a74d ("ath10k: enable napi on RX path for sdio")
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
019edd01d174 ath10k: sdio: Add missing BH locking around napi_schdule()
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210824144339.2796122-1-festevam@denx.de/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-28 14:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 14:43 [PATCH] ath10k: sdio: Add missing BH locking around napi_schdule() Fabio Estevam
2021-08-31 18:21 ` Fabio Estevam
2021-09-28 14:36 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).