Patch "ath10k: sdio: Add missing BH locking around napi_schdule()" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ath10k: sdio: Add missing BH locking around napi_schdule()

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ath10k-sdio-add-missing-bh-locking-around-napi_schdu.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1ef3e6eef0b4585e371e1f6736172f88c4e31a0e
Author: Fabio Estevam <festevam@xxxxxxx>
Date:   Tue Sep 28 14:00:47 2021 +0300

    ath10k: sdio: Add missing BH locking around napi_schdule()
    
    [ Upstream commit 019edd01d174ce4bb2e517dd332922514d176601 ]
    
    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@xxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210824144339.2796122-1-festevam@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
index b746052737e0b..eb705214f3f0a 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)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux