From: Leon Romanovsky <leon@kernel.org>
To: Long Li <longli@microsoft.com>
Cc: Kees Bakker <kees@ijzerbout.nl>,
Konstantin Taranov <kotaranov@microsoft.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [EXTERNAL] [PATCH] RDMA/mana_ib: Ensure variable err is initialized
Date: Sun, 23 Feb 2025 13:28:22 +0200 [thread overview]
Message-ID: <20250223112822.GZ53094@unreal> (raw)
In-Reply-To: <SA6PR21MB4231810186481AF0A68AAC6ECEC72@SA6PR21MB4231.namprd21.prod.outlook.com>
On Fri, Feb 21, 2025 at 08:34:43PM +0000, Long Li wrote:
> > Subject: [EXTERNAL] [PATCH] RDMA/mana_ib: Ensure variable err is initialized
> >
> > [Some people who received this message don't often get email from
> > kees@ijzerbout.nl. Learn why this is important at
> > https://aka.ms/LearnAboutSenderIdentification ]
> >
> > In the function mana_ib_gd_create_dma_region if there are no dma blocks to
> > process the variable `err` remains uninitialized.
> >
> > Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure
> > Network Adapter")
> > Signed-off-by: Kees Bakker <kees@ijzerbout.nl>
>
> I think it's an impossible condition, but the patch looks good to me.
Agree, it is impossible.
>
> Reviewed-by: Long Li <longli@microsoft.com>
Thanks
>
> > ---
> > drivers/infiniband/hw/mana/main.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/hw/mana/main.c
> > b/drivers/infiniband/hw/mana/main.c
> > index 114ca8c509ce..eda9c5b971de 100644
> > --- a/drivers/infiniband/hw/mana/main.c
> > +++ b/drivers/infiniband/hw/mana/main.c
> > @@ -384,7 +384,7 @@ static int mana_ib_gd_create_dma_region(struct
> > mana_ib_dev *dev, struct ib_umem
> > unsigned int tail = 0;
> > u64 *page_addr_list;
> > void *request_buf;
> > - int err;
> > + int err = 0;
> >
> > gc = mdev_to_gc(dev);
> > hwc = gc->hwc.driver_data;
> > --
> > 2.48.1
>
next prev parent reply other threads:[~2025-02-23 11:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 19:39 [PATCH] RDMA/mana_ib: Ensure variable err is initialized Kees Bakker
2025-02-21 20:34 ` [EXTERNAL] " Long Li
2025-02-23 11:28 ` Leon Romanovsky [this message]
2025-02-23 11:28 ` Leon Romanovsky
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=20250223112822.GZ53094@unreal \
--to=leon@kernel.org \
--cc=jgg@ziepe.ca \
--cc=kees@ijzerbout.nl \
--cc=kotaranov@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@microsoft.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox