Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3967541ybx; Mon, 4 Nov 2019 05:47:00 -0800 (PST) X-Google-Smtp-Source: APXvYqxWgInM6sbZ12VIgczN7yxq/mY5k2HiJhUxq+IGyE2XSmmdKn+uhMxsPCdihG4gsoFzqaB4 X-Received: by 2002:a17:906:80c:: with SMTP id e12mr6957682ejd.59.1572875220295; Mon, 04 Nov 2019 05:47:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572875220; cv=none; d=google.com; s=arc-20160816; b=KHPmafREpp+NY+diHn5G4xvcRv/i7B6Q4etwKtGAVQgtxg8W4w8D6Szx5o3YMxLK06 FRneuIva4EQ6opsaHP+VBgEiFKLGBAltkdrrMXJZXDXipipO9mUPogU5HBLn4jSzYGOh d51UqfmtWNfc6HFRkpjUmxpsl+PvSdI0Yx0le0unVA2v9yQKmWwBPhQjmLEY8fsQF4ew bQH3wBNHp9NDU5LgYvG5y/L+Nm03Fs9JGVBDrCwvUQTo3T6WH77sVO/g7n+iI/3XjAhM DGIchHMVHDtX7vOoTwtHhK8bAAX32Tv+TNKgkuXB3ITbSfcvqTOTkRUFN6JXCfXM1diF xggg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=dOYO6egs0bjIP1nNlCA4bmXW/UbnOkSv/ESRp3bPBZI=; b=NWITVFs9dQPm13seUFX/kxNRs2wia+FC2AkFS47k8IfltI+vuQQ52KJ/1YfKH88fJH ZijX0B6JhKFFvNA0ETWUttvSmeMTHoVoVCikRbYDSLmURpqRiZbmNI0V0KeBURPasAsj YzG+trhbhCRQVL0ltam2r1rY3tlCV4Z0eFj7IX2VhbLzgL4SZzwDs4Vb1zW8tvZjGDtT yYAapr7B3oaAYQzjNI+oOoxhbaU7CRkHKMW71J6o2zeULl5E0bEW3rGYmUyVaEvxxs/C zwYUHRWDjJyK4ErnQV+AcpQsMgzpM4VN4tittsiLWS8QbdLEEIwJJ/Y4ezh+Wokuub2k XtbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h22si8403885edb.346.2019.11.04.05.46.22; Mon, 04 Nov 2019 05:47:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727998AbfKDNqG (ORCPT + 99 others); Mon, 4 Nov 2019 08:46:06 -0500 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]:35871 "EHLO smail.rz.tu-ilmenau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727663AbfKDNqG (ORCPT ); Mon, 4 Nov 2019 08:46:06 -0500 Received: from thunderstorm.prakinf.tu-ilmenau.de (thunderstorm.prakinf.tu-ilmenau.de [141.24.212.108]) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPA id E88A058006E; Mon, 4 Nov 2019 14:46:04 +0100 (CET) From: Markus Theil To: nbd@nbd.name Cc: lorenzo.bianconi@redhat.com, sgruszka@redhat.com, linux-wireless@vger.kernel.org, Markus Theil Subject: [PATCH] mt76: disable softirqs while calling ieee80211_rx_napi Date: Mon, 4 Nov 2019 14:45:40 +0100 Message-Id: <20191104134540.19199-1-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.17.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org mac80211 assumes ieee80211_rx_napi to be called with disabled softirqs. ieee80211_rx_napi in mac80211.c can be called from aggregation reordering work queue or from mt76_rx_poll_complete. mt76_rx_poll_complete does currently not disable softirq processing. This patch fixes this by disabling softirqs before calling ieee80211_rx_napi. It should be no problem to disable them twice, if mt76_aggr_reorder_work calls ieee80211_rx_napi and has already called local_bh_disable, as local_bh_disable/local_bh_enable are reentrant. I became aware of this issue by the following dmesg output: NOHZ: local_softirq_pending 08 Signed-off-by: Markus Theil --- drivers/net/wireless/mediatek/mt76/mac80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index 1a2c143b34d0..43c050660fc7 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -628,7 +628,7 @@ void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames, struct ieee80211_sta *sta; struct sk_buff *skb; - spin_lock(&dev->rx_lock); + spin_lock_bh(&dev->rx_lock); while ((skb = __skb_dequeue(frames)) != NULL) { if (mt76_check_ccmp_pn(skb)) { dev_kfree_skb(skb); @@ -638,7 +638,7 @@ void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames, sta = mt76_rx_convert(skb); ieee80211_rx_napi(dev->hw, sta, skb, napi); } - spin_unlock(&dev->rx_lock); + spin_unlock_bh(&dev->rx_lock); } void mt76_rx_poll_complete(struct mt76_dev *dev, enum mt76_rxq_id q, -- 2.20.1