All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ansuel Smith <ansuelsmth@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@lists.01.org, kernel test robot <lkp@intel.com>,
	kbuild-all@lists.01.org, open list <linux-kernel@vger.kernel.org>
Subject: Re: drivers/net/dsa/qca8k.c:944 qca8k_parse_port_config() error: testing array offset 'cpu_port_index' after use.
Date: Tue, 16 Nov 2021 14:40:21 +0100	[thread overview]
Message-ID: <CA+_ehUxQrbMVMgH2wGt5GBAsutN3OWGgOUH_6BpC8_NnN-syKg@mail.gmail.com> (raw)
In-Reply-To: <20211116133720.GI27562@kadam>

>
> On Tue, Nov 16, 2021 at 02:30:59PM +0100, Ansuel Smith wrote:
> > > On Mon, Nov 15, 2021 at 07:08:30PM +0100, Ansuel Smith wrote:
> > > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git   master
> > > > > head:   debe436e77c72fcee804fb867f275e6d31aa999c
> > > > > commit: 5654ec78dd7e64b1e04777b24007344329e6a63b net: dsa: qca8k: rework rgmii delay logic and scan for cpu port 6
> > > > > config: i386-randconfig-m021-20211025 (attached as .config)
> > > > > compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> > > > >
> > > > > If you fix the issue, kindly add following tag as appropriate
> > > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > > >
> > > >
> > > > This should already be fixed by 06dd34a628ae5b6a839b757e746de165d6789ca8
> > > > Can you confirm this?
> > > >
> > >
> > > No, it doesn't fix the problem.  The check is either useless and should
> > > be removed or there is an out of bounds bug.  Checking for an out of
> > > bounds *after* you've already written to the memory is *never* useful.
> > >
> > > regards,
> > > dan carpenter
> > >
> >
> > Again sorry if I insist and I'm 99% missing something.
> > There was an out of bounds bug.
> > It was fixed by 06dd34a628ae5b6a839b757e746de165d6789ca8 by
> > starting the counter to -1.
> > The extra check is useless, yes.
>
> Then just delete it.  We don't want code which is illogical even if it
> has no effect on run time.
>
> regards,
> dan carpenter
>

Ok, will include this in the next series with your reported-by tag.

WARNING: multiple messages have this Message-ID (diff)
From: Ansuel Smith <ansuelsmth@gmail.com>
To: kbuild-all@lists.01.org
Subject: Re: drivers/net/dsa/qca8k.c:944 qca8k_parse_port_config() error: testing array offset 'cpu_port_index' after use.
Date: Tue, 16 Nov 2021 14:40:21 +0100	[thread overview]
Message-ID: <CA+_ehUxQrbMVMgH2wGt5GBAsutN3OWGgOUH_6BpC8_NnN-syKg@mail.gmail.com> (raw)
In-Reply-To: <20211116133720.GI27562@kadam>

[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]

>
> On Tue, Nov 16, 2021 at 02:30:59PM +0100, Ansuel Smith wrote:
> > > On Mon, Nov 15, 2021 at 07:08:30PM +0100, Ansuel Smith wrote:
> > > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git   master
> > > > > head:   debe436e77c72fcee804fb867f275e6d31aa999c
> > > > > commit: 5654ec78dd7e64b1e04777b24007344329e6a63b net: dsa: qca8k: rework rgmii delay logic and scan for cpu port 6
> > > > > config: i386-randconfig-m021-20211025 (attached as .config)
> > > > > compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> > > > >
> > > > > If you fix the issue, kindly add following tag as appropriate
> > > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > > >
> > > >
> > > > This should already be fixed by 06dd34a628ae5b6a839b757e746de165d6789ca8
> > > > Can you confirm this?
> > > >
> > >
> > > No, it doesn't fix the problem.  The check is either useless and should
> > > be removed or there is an out of bounds bug.  Checking for an out of
> > > bounds *after* you've already written to the memory is *never* useful.
> > >
> > > regards,
> > > dan carpenter
> > >
> >
> > Again sorry if I insist and I'm 99% missing something.
> > There was an out of bounds bug.
> > It was fixed by 06dd34a628ae5b6a839b757e746de165d6789ca8 by
> > starting the counter to -1.
> > The extra check is useless, yes.
>
> Then just delete it.  We don't want code which is illogical even if it
> has no effect on run time.
>
> regards,
> dan carpenter
>

Ok, will include this in the next series with your reported-by tag.

  reply	other threads:[~2021-11-16 13:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 21:37 drivers/net/dsa/qca8k.c:944 qca8k_parse_port_config() error: testing array offset 'cpu_port_index' after use kernel test robot
2021-11-15  9:12 ` Dan Carpenter
2021-11-15  9:12 ` Dan Carpenter
2021-11-15 18:08 ` Ansuel Smith
2021-11-15 18:08   ` Ansuel Smith
2021-11-16  6:30   ` Dan Carpenter
2021-11-16  6:30     ` Dan Carpenter
2021-11-16  6:30     ` Dan Carpenter
2021-11-16 13:30     ` Ansuel Smith
2021-11-16 13:30       ` Ansuel Smith
2021-11-16 13:37       ` Dan Carpenter
2021-11-16 13:37         ` Dan Carpenter
2021-11-16 13:37         ` Dan Carpenter
2021-11-16 13:40         ` Ansuel Smith [this message]
2021-11-16 13:40           ` Ansuel Smith
2021-11-15 18:46 kernel test robot

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=CA+_ehUxQrbMVMgH2wGt5GBAsutN3OWGgOUH_6BpC8_NnN-syKg@mail.gmail.com \
    --to=ansuelsmth@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.