Re: [PATCH] net: mac80211: cfg: Initialize cnt before accessing elem

2024-11-25 Thread Gustavo A. R. Silva
On 23/11/24 11:08, Haoyu Li wrote: With the new __counted_by annocation in cfg80211_rnr_elems, the "cnt" struct member must be set before accessing the "elem" array. Failing to do so will trigger a runtime warning when enabling CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Nice catch. :)

[PATCH] net: mac80211: cfg: Initialize cnt before accessing elem in ieee80211_copy_mbssid_beacon

2024-11-23 Thread Haoyu Li
With the new __counted_by annocation in cfg80211_mbssid_elems, the "cnt" struct member must be set before accessing the "elem" array. Failing to do so will trigger a runtime warning when enabling CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Fixes: c14679d7005a ("wifi: cfg80211: Annotate struct c

[PATCH] net: mac80211: cfg: Initialize cnt before accessing elem

2024-11-23 Thread Haoyu Li
With the new __counted_by annocation in cfg80211_rnr_elems, the "cnt" struct member must be set before accessing the "elem" array. Failing to do so will trigger a runtime warning when enabling CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Fixes: 7b6d7087031b ("wifi: cfg80211: Annotate struct cfg8