mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: xu.xin16@zte.com.cn
Cc: kees@kernel.org, concord@gentoo.org,
	linux-wireless@vger.kernel.org,  linux-kernel@vger.kernel.org,
	qiu.yutan@zte.com.cn
Subject: Re: wifi: mac80211: make n_channels updated absolutely before accessing channels[]
Date: Wed, 12 Nov 2025 13:13:46 +0100	[thread overview]
Message-ID: <2083602a6dac97bb87b32d8832e8ac7e33506fbc.camel@sipsolutions.net> (raw)
In-Reply-To: <20251112165040828QPfTMyxpU6TF3SvlWuQdq@zte.com.cn>

On Wed, 2025-11-12 at 16:50 +0800, xu.xin16@zte.com.cn wrote:
> > > From: xu xin <xu.xin16@zte.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&apos;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

      reply	other threads:[~2025-11-12 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12  8:37 xu.xin16
2025-11-12  8:41 ` Johannes Berg
2025-11-12  8:50   ` xu.xin16
2025-11-12 12:13     ` Johannes Berg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2083602a6dac97bb87b32d8832e8ac7e33506fbc.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=concord@gentoo.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=qiu.yutan@zte.com.cn \
    --cc=xu.xin16@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®