From: Kalle Valo <kvalo@kernel.org>
To: Jiri Kosina <jikos@kernel.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Ping-Ke Shih <pkshih@realtek.com>
Subject: Re: [PATCH] rtw89: fix RCU usage in rtw89_core_txq_push() (was Re: [PATCH] mac80211: fix RCU usage in ieee80211_tx_h_select_key())
Date: Tue, 15 Feb 2022 19:27:43 +0200 [thread overview]
Message-ID: <87r1849h0w.fsf@tynnyri.adurom.net> (raw)
In-Reply-To: <nycvar.YFH.7.76.2202151700540.11721@cbobk.fhfr.pm> (Jiri Kosina's message of "Tue, 15 Feb 2022 17:11:11 +0100 (CET)")
Jiri Kosina <jikos@kernel.org> writes:
> On Tue, 15 Feb 2022, Johannes Berg wrote:
>
>> >
>> > ieee80211_tx_h_select_key() is performing a series of RCU dereferences,
>> > but none of the callers seems to be taking RCU read-side lock; let's
>> > acquire the lock in ieee80211_tx_h_select_key() itself.
>> >
>> but but ...
>>
>> > ieee80211_tx_dequeue+0x1a7/0x1260 [mac80211 911c23e2351c0ae60b597a67b1204a5ea955e365]
>> > rtw89_core_txq_work+0x1a6/0x420 [rtw89_core b39ba493f2e517ad75e0f8187ecc24edf58bbbea]
>>
>> /**
>> * ieee80211_tx_dequeue - dequeue a packet from a software tx queue
>> *
>> * @hw: pointer as obtained from ieee80211_alloc_hw()
>> * @txq: pointer obtained from station or virtual interface, or from
>> * ieee80211_next_txq()
>> *
>> * Returns the skb if successful, %NULL if no frame was available.
>> *
>> * Note that this must be called in an rcu_read_lock() critical section,
>> * which can only be released after the SKB was handled. Some pointers in
>> [...]
>>
>> -> driver bug?
>
> Right you are, thanks.
>
> CCing Ping-Ke Shih; find updated fix below.
>
>
>
>
> From: Jiri Kosina <jkosina@suse.cz>
> Subject: [PATCH] rtw89: fix RCU usage in rtw89_core_txq_push()
>
> ieee80211_tx_h_select_key() is performing a series of RCU dereferences,
> but rtw89_core_txq_push() is calling it (via ieee80211_tx_dequeue_ni())
> without RCU read-side lock held; fix that.
I think we have discussed this before, but patchwork can't handle
patches the way you embed them in email discussions:
https://patchwork.kernel.org/project/linux-wireless/patch/nycvar.YFH.7.76.2202151700540.11721@cbobk.fhfr.pm/
Please resubmit.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2022-02-15 17:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 15:47 [PATCH] mac80211: fix RCU usage in ieee80211_tx_h_select_key() Jiri Kosina
2022-02-15 15:50 ` Johannes Berg
2022-02-15 16:11 ` [PATCH] rtw89: fix RCU usage in rtw89_core_txq_push() (was Re: [PATCH] mac80211: fix RCU usage in ieee80211_tx_h_select_key()) Jiri Kosina
2022-02-15 17:27 ` Kalle Valo [this message]
2022-02-16 15:27 ` Jiri Kosina
2022-02-15 21:06 ` [PATCH] mac80211: fix RCU usage in ieee80211_tx_h_select_key() kernel test robot
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=87r1849h0w.fsf@tynnyri.adurom.net \
--to=kvalo@kernel.org \
--cc=jikos@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.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).