Skip to content

Commit aef27b5

Browse files
dmantipovgregkh
authored andcommitted
wifi: cfg80211: adjust allocation of colocated AP data
[ Upstream commit 1a0d247 ] 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: c8cb5b8 ("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>
1 parent 9b66093 commit aef27b5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

net/wireless/scan.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -857,9 +857,7 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)
857857
if (ret)
858858
continue;
859859

860-
entry = kzalloc(sizeof(*entry) + IEEE80211_MAX_SSID_LEN,
861-
GFP_ATOMIC);
862-
860+
entry = kzalloc(sizeof(*entry), GFP_ATOMIC);
863861
if (!entry)
864862
continue;
865863

0 commit comments

Comments
 (0)