From: Ping-Ke Shih <pkshih@realtek.com>
To: Josef Schlehofer <pepe.schlehofer@gmail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH rtw-next] wifi: rtw89: regd: avoid freeing devm-allocated 6 GHz band
Date: Mon, 30 Nov 2026 04:03:04 +0000 [thread overview]
Message-ID: <eca612db16f74dbb8298f43b2bacc6f4@realtek.com> (raw)
In-Reply-To: <20261129084438.57812-1-pepe.schlehofer@gmail.com>
Josef Schlehofer <pepe.schlehofer@gmail.com> wrote:
> When ACPI disallows 6 GHz, rtw89_regd_setup_6ghz() frees the band and
> its iftype data with kfree(), even though both are devm-allocated.
> Devres then frees them again during device teardown.
>
> Only clear the wiphy band pointer and leave the allocations to devres.
>
> Fixes: 145df52a8671 ("wifi: rtw89: Convert rtw89_core_set_supported_band to use devm_*")
> Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
> @@ -635,13 +634,7 @@ static void rtw89_regd_setup_6ghz(struct rtw89_dev *rtwdev, struct wiphy *wiphy)
> return;
> }
>
> - sband = wiphy->bands[NL80211_BAND_6GHZ];
> - if (!sband)
> - return;
> -
nit: I'd like a comment here to be clear that bands allocated by devm.
> wiphy->bands[NL80211_BAND_6GHZ] = NULL;
> - kfree((__force void *)sband->iftype_data);
> - kfree(sband);
> }
>
> #define RTW89_DEF_REGD_STR(regd) \
> --
> 2.54.0 (Apple Git-157)
next prev parent reply other threads:[~2026-11-30 4:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 8:44 [PATCH rtw-next] wifi: rtw89: regd: avoid freeing devm-allocated 6 GHz band Josef Schlehofer
2026-11-30 4:03 ` Ping-Ke Shih [this message]
2026-12-01 8:35 ` Ping-Ke Shih
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=eca612db16f74dbb8298f43b2bacc6f4@realtek.com \
--to=pkshih@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pepe.schlehofer@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 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.