From: Johannes Berg <johannes@sipsolutions.net>
To: Jiri Kosina <jikos@kernel.org>
Cc: "Emmanuel Grumbach" <emmanuel.grumbach@intel.com>,
"Luca Coelho" <luciano.coelho@intel.com>,
"Intel Linux Wireless" <linuxwifi@intel.com>,
"Kalle Valo" <kvalo@codeaurora.org>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Toke Høiland-Jørgensen" <toke@redhat.com>
Subject: Re: [PATCH v5.1-rc] iwlwifi: make locking in iwl_mvm_tx_mpdu() BH-safe
Date: Tue, 01 Oct 2019 11:52:57 +0200 [thread overview]
Message-ID: <9b6f5c279e8aea8e6241d03b0b21de88ac49e8b2.camel@sipsolutions.net> (raw)
In-Reply-To: <46cce48de455acf073ad0582565d1fe34253f823.camel@sipsolutions.net>
On Tue, 2019-10-01 at 11:46 +0200, Johannes Berg wrote:
>
> ieee80211_wake_queues_by_reason() does
> spin_lock_irqsave()/spin_unlock_irqrestore() - why is that "{SOFTIRQ-ON-
> W} usage"?
scratch that - _ieee80211_wake_txqs() unlocks that again...
It does hold RCU critical section, but that's not the same as disabling
BHs.
I think we should do this perhaps - I think it'd be better to ensure
that the drivers' wake_tx_queue op is always called with softirqs
disabled, since that happens in almost all cases already ...
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 051a02ddcb85..ad1e88958da2 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -273,9 +273,9 @@ static void __ieee80211_wake_txqs(struct ieee80211_sub_if_data *sdata, int ac)
&txqi->flags))
continue;
- spin_unlock_bh(&fq->lock);
+ spin_unlock(&fq->lock);
drv_wake_tx_queue(local, txqi);
- spin_lock_bh(&fq->lock);
+ spin_lock(&fq->lock);
}
}
Perhaps we could add some validation into drv_wake_tx_queue(), but I
didn't find the right thing to call right now ...
Toke, what do you think?
johannes
prev parent reply other threads:[~2019-10-01 9:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 11:03 [PATCH v5.1-rc] iwlwifi: make locking in iwl_mvm_tx_mpdu() BH-safe Jiri Kosina
2019-04-15 11:10 ` Johannes Berg
2019-04-15 11:33 ` Jiri Kosina
2019-04-15 11:37 ` Johannes Berg
2019-04-15 12:06 ` Jiri Kosina
2019-04-15 12:08 ` Johannes Berg
2019-09-11 11:42 ` Jiri Kosina
2019-09-11 12:04 ` Jiri Kosina
2019-09-20 21:34 ` Jiri Kosina
2019-10-01 9:46 ` Johannes Berg
2019-10-01 9:52 ` Johannes Berg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9b6f5c279e8aea8e6241d03b0b21de88ac49e8b2.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=emmanuel.grumbach@intel.com \
--cc=jikos@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxwifi@intel.com \
--cc=luciano.coelho@intel.com \
--cc=netdev@vger.kernel.org \
--cc=toke@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).