From: Johannes Berg <johannes@sipsolutions.net>
To: Cen Zhang <zzzccc427@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
baijiaju1990@gmail.com
Subject: Re: [PATCH] wifi: mac80211_hwsim: remove radios from rhashtable before freeing
Date: Mon, 06 Jul 2026 13:38:15 +0200 [thread overview]
Message-ID: <ab97c01b73b96bf36527007e19743d3bb5a07634.camel@sipsolutions.net> (raw)
In-Reply-To: <20260619162419.3874564-1-zzzccc427@gmail.com> (sfid-20260619_182429_647709_7678E401)
On Sat, 2026-06-20 at 00:24 +0800, Cen Zhang wrote:
> mac80211_hwsim_new_radio() publishes each registered radio on the
> hwsim_radios list and in hwsim_radios_rht. The generic-netlink and
> virtio command paths use the rhashtable to find radios by address.
>
> Most radio removal paths remove the hash entry while holding
> hwsim_radio_lock before unregistering and freeing the radio. However,
> mac80211_hwsim_free() only removes the list entry. During init error
> unwinding after hwsim netlink and virtio registration, this can leave a
> freed radio reachable from hwsim_radios_rht until the callback surfaces
> are unpublished and the rhashtable is destroyed.
How does the init even fail? I think this is fairly contrived,
especially in a test tool. The whole thing is maybe worth a cleanup, but
the whole scary commit message is nonsense.
johannes
next prev parent reply other threads:[~2026-07-06 11:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 16:24 [PATCH] wifi: mac80211_hwsim: remove radios from rhashtable before freeing Cen Zhang
2026-07-06 11:38 ` Johannes Berg [this message]
2026-07-06 12:10 ` Cen Zhang
2026-07-06 12:14 ` Johannes Berg
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=ab97c01b73b96bf36527007e19743d3bb5a07634.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=baijiaju1990@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=zzzccc427@gmail.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