[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACGkMEu2Dq6MWM9D4AgUMXWe-evhmN5pMGjWeW84Yzj5MBXK4g@mail.gmail.com>
Date: Mon, 28 Jul 2025 11:29:47 +0800
From: Jason Wang <jasowang@...hat.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: xuanzhuo@...ux.alibaba.com, eperezma@...hat.com,
virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org,
Naresh Kamboju <naresh.kamboju@...aro.org>, Randy Dunlap <rdunlap@...radead.org>,
"kernelci . org bot" <bot@...nelci.org>, Linux Kernel Functional Testing <lkft@...aro.org>
Subject: Re: [PATCH] virtio_ring: fix uninitialized used value
On Fri, Jul 25, 2025 at 9:12 PM Michael S. Tsirkin <mst@...hat.com> wrote:
>
> On Fri, Jul 25, 2025 at 04:36:35PM +0800, Jason Wang wrote:
> > Buildbot reports uninitialized used:
> >
> > drivers/virtio/virtio_ring.c:2113:40: error: variable 'id' is
> > uninitialized when used here [-Werror,-Wuninitialized]
> > 2113 | BAD_RING(vq, "id %u out of range\n", id);
> > | ^~
> > drivers/virtio/virtio_ring.c:2077:19: note: initialize the variable
> > 'id' to silence this warning
> > 2077 | u16 last_used, id, last_used_idx;
> > | ^
> > | = 0
> > 1 error generated.
> >
> > Fixing this by use last_used instead and drop the complete unused
> > variable id.
> >
> > Cc: Naresh Kamboju <naresh.kamboju@...aro.org>
> > Cc: Randy Dunlap <rdunlap@...radead.org>
> > Reported-by: kernelci.org bot <bot@...nelci.org>
> > Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
>
> I squashed but I think you should respin.
> also noticed a couple of minor issues.
>
I think a reppin of this patch should be sufficient.
I can post a new version.
Thanks
Powered by blists - more mailing lists