Re: wifi: mac80211: make n_channels updated absolutely before accessing channels[]
From: xu.xin16
Date: Wed Nov 12 2025 - 03:51:44 EST
> > From: xu xin <xu.xin16@xxxxxxxxxx>
> >
> > The commit 2663d0462eb3 ("wifi: mac80211: Avoid address calculations via out of
> > bounds array indexing") said that req->n_channels must be set before
> > req->channels[] can be used. But there's still the case that req.channels
> > accessing was prior to n_channels++.
> >
> > This does not fix any visible bug, just making n_channels updated before
> > accessing channels[] absolutely, to avoid potential UBSAN out of indexing
> > warning.
>
> I reverted the annotations, so this isn't necessary.
Excuse me, what is the annotations you reverted ? Maybe I missed somthing.