diff options
| author | Dmitry Antipov <dmantipov@yandex.ru> | 2025-01-13 18:54:17 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-13 12:49:58 +0100 |
| commit | 7d07de96990e68f2e69dd180e697501324d6a36e (patch) | |
| tree | 15f1ba4196facc35bd8ff0c47b680d23897a2fed /net/wireless/scan.c | |
| parent | 7427e4afbd161aac1120a49870cb518b8e983cef (diff) | |
| download | linux-7d07de96990e68f2e69dd180e697501324d6a36e.tar.gz linux-7d07de96990e68f2e69dd180e697501324d6a36e.tar.bz2 linux-7d07de96990e68f2e69dd180e697501324d6a36e.zip | |
wifi: cfg80211: adjust allocation of colocated AP data
[ Upstream commit 1a0d24775cdee2b8dc14bfa4f4418c930ab1ac57 ]
In 'cfg80211_scan_6ghz()', an instances of 'struct cfg80211_colocated_ap'
are allocated as if they would have 'ssid' as trailing VLA member. Since
this is not so, extra IEEE80211_MAX_SSID_LEN bytes are not needed.
Briefly tested with KUnit.
Fixes: c8cb5b854b40 ("nl80211/cfg80211: support 6 GHz scanning")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://patch.msgid.link/20250113155417.552587-1-dmantipov@yandex.ru
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/wireless/scan.c')
| -rw-r--r-- | net/wireless/scan.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index ad857cd1e6f0..d977d7a7675e 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -821,9 +821,7 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev) if (ret) continue; - entry = kzalloc(sizeof(*entry) + IEEE80211_MAX_SSID_LEN, - GFP_ATOMIC); - + entry = kzalloc(sizeof(*entry), GFP_ATOMIC); if (!entry) continue; |
