On Mon, 2023-11-27 at 14:25 +0300, Dmitry Antipov wrote: > Following commit 9118796dfa67 ("wifi: mac80211: Add __counted_by for struct > ieee802_11_elems and use struct_size()"), use an incoming '__counted_by()' > attribute for the flexible array members of 'struct probe_resp', 'struct > fils_discovery_data', 'struct unsol_bcast_probe_resp_data', 'struct > ieee80211_mgd_auth_data' and 'struct ieee80211_mgd_assoc_data', as well as > 'struct_size()' helper to allocate an instances of them where appropriate. > This also introduces reordering of statements in 'ieee80211_mgd_auth()' > and 'ieee80211_mgd_assoc()' because the counter field should (is better > to?) be adjusted before touching the corresponding '__counted_by()' area. For the record, regardless of the commments from Gustavo, I'm going to put this on the back of the list because we have various things in flight now that touch these areas, particularly mgd_auth/mgd_assoc and related code. Not convinced that it's worth making more work on other things for this, when I don't even think (released) compilers have support yet. So just FYI, you might want to come back with this in a month or two when hopefully other things have settled. johannes