On Tue, 2024-12-03 at 23:20 +0800, Haoyu Li wrote:
With the new __counted_by annocation in cfg80211_scan_request struct, the "n_channels" struct member must be set before accessing the "channels" array. Failing to do so will trigger a runtime warning when enabling CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE.
Fixes: e3eac9f32ec0 ("wifi: cfg80211: Annotate struct cfg80211_scan_request with __counted_by")
Signed-off-by: Haoyu Li lihaoyu499@gmail.com
nit: there should be no newline between these
My tolerance for this is going WAY down, it seems it's all just busy- work, and then everyone complains and I need to handle "urgent fixes" because of it etc.
I'm having severe second thoughts about ever having accepted the __counted_by annotations, I think we should just revert it. Experiment failed, we found ... that the code is fine but constantly needs changes to make the checkers happy.
johannes