[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2083602a6dac97bb87b32d8832e8ac7e33506fbc.camel@sipsolutions.net>
Date: Wed, 12 Nov 2025 13:13:46 +0100
From: Johannes Berg <johannes@...solutions.net>
To: xu.xin16@....com.cn
Cc: kees@...nel.org, concord@...too.org, linux-wireless@...r.kernel.org,
linux-kernel@...r.kernel.org, qiu.yutan@....com.cn
Subject: Re: wifi: mac80211: make n_channels updated absolutely before
accessing channels[]
On Wed, 2025-11-12 at 16:50 +0800, xu.xin16@....com.cn wrote:
> > > From: xu xin <xu.xin16@....com.cn>
> > >
> > > 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.
You missed multiple things, for example the fact that your changes do
nothing.
Please, everyone, don't submit changes when you don't understand _both_
the original code (at least mostly) and your "own" changes.
Otherwise we'll just think you used an LLM to cause us work and never
take you seriously again.
johannes
Powered by blists - more mailing lists