From: Luka Gejak <luka.gejak@linux.dev>
To: Mehmet Fide <mehmet.fide@gmail.com>, Ping-Ke Shih <pkshih@realtek.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>,
Zong-Zhe Yang <kevin_yang@realtek.com>,
Tzu-En Huang <tehuang@realtek.com>,
Yan-Hsuan Chuang <yhchuang@realtek.com>,
Kalle Valo <kvalo@kernel.org>,
Stanislaw Gruszka <sgruszka@redhat.com>,
Brian Norris <briannorris@chromium.org>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
mehmet.fide@screeningeagle.com
Subject: Re: [PATCH rtw-next v3 3/5] wifi: rtw88: do not drop stations when collecting them for an iteration
Date: Fri, 20 Nov 2026 14:09:18 +0100 [thread overview]
Message-ID: <20261120131000.33858-3-luka.gejak@linux.dev> (raw)
In-Reply-To: <20261117171003.1840491-4-mehmet.fide@gmail.com>
Hi Mehmet,
Thanks for taking care of the allocation failure. One comment below.
On November 17, 2026 6:10:01 PM GMT+01:00, Mehmet Fide
<mehmet.fide@gmail.com> wrote:
> static void rtw_collect_sta_iter(void *data, struct ieee80211_sta *sta)
> {
> struct rtw_iter_stas_data *iter_stas = data;
> - struct rtw_stas_entry *stas_entry;
> + struct rtw_sta_info *si = (struct rtw_sta_info *)sta->drv_priv;
>
> - stas_entry = kmalloc_obj(*stas_entry, GFP_ATOMIC);
> - if (!stas_entry)
> - return;
> -
> - stas_entry->sta = sta;
> - list_add_tail(&stas_entry->list, &iter_stas->list);
> + list_add_tail(&si->iter_list, &iter_stas->list);
> }
Does the driver mutex still pin a client that has already gone back
from ASSOC to AUTH? In AP mode mac80211 can do that when userspace
clears ASSOCIATED. drv_sta_state() calls rtw_ops_sta_remove() then, but
leaves sta->uploaded set, so the watchdog can still collect the client.
If userspace deletes that client after the collection drops RCU,
mac80211 can free it without calling rtw_ops_sta_remove() again. The
temporary list now has a node in the freed station. list_del_init()
can write to that node before the callback runs. The old code already
kept the station pointer too long, and this adds the list operations
on it.
Could we skip stations with no si->vif while collecting them? As far as
I can see, rtw_sta_remove() clears it under the same mutex.
Best regards,
Luka Gejak
next prev parent reply other threads:[~2026-11-20 13:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 17:09 [PATCH rtw-next v3 0/5] wifi: rtw88: fixes around the firmware recovery Mehmet Fide
2026-11-17 17:09 ` [PATCH rtw-next v3 1/5] wifi: rtw88: free the reserved pages of an interface on " Mehmet Fide
2026-11-20 13:09 ` Luka Gejak
2026-11-20 17:01 ` Mehmet Fide
2026-11-17 17:10 ` [PATCH rtw-next v3 2/5] wifi: rtw88: report the frames purged from the TX report queue Mehmet Fide
2026-11-20 13:09 ` Luka Gejak
2026-11-20 17:02 ` Mehmet Fide
2026-11-17 17:10 ` [PATCH rtw-next v3 3/5] wifi: rtw88: do not drop stations when collecting them for an iteration Mehmet Fide
2026-11-20 13:09 ` Luka Gejak [this message]
2026-11-20 17:02 ` Mehmet Fide
2026-11-20 17:18 ` Luka Gejak
2026-11-20 18:27 ` Mehmet Fide
2026-11-17 17:10 ` [PATCH rtw-next v3 4/5] wifi: rtw88: reset the stations outside of RCU on firmware recovery Mehmet Fide
2026-11-17 17:10 ` [PATCH rtw-next v3 5/5] wifi: rtw88: clear the restart flag when the device is stopped Mehmet Fide
2026-11-17 23:15 ` Mehmet Fide
2026-11-18 0:45 ` Ping-Ke Shih
2026-11-19 14:31 ` [PATCH rtw-next v3 0/5] wifi: rtw88: fixes around the firmware recovery Luka Gejak
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=20261120131000.33858-3-luka.gejak@linux.dev \
--to=luka.gejak@linux.dev \
--cc=briannorris@chromium.org \
--cc=kevin_yang@realtek.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mehmet.fide@gmail.com \
--cc=mehmet.fide@screeningeagle.com \
--cc=pkshih@realtek.com \
--cc=s.hauer@pengutronix.de \
--cc=sgruszka@redhat.com \
--cc=tehuang@realtek.com \
--cc=yhchuang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.