From: Dan Carpenter <dan.carpenter@oracle.com>
To: Cheng Xu <chengyou@linux.alibaba.com>
Cc: Kai Shen <kaishen@linux.alibaba.com>,
Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] RDMA/erdma: signedness bug in erdma_request_vectors()
Date: Thu, 9 Jun 2022 09:58:57 +0300 [thread overview]
Message-ID: <20220609065856.GV2168@kadam> (raw)
In-Reply-To: <604ea67b-fa8e-0e36-0adf-2940facfe4ee@linux.alibaba.com>
On Thu, Jun 09, 2022 at 11:00:03AM +0800, Cheng Xu wrote:
>
>
> On 6/8/22 9:47 PM, Dan Carpenter wrote:
> > The dev->attrs.irq_num variable is a u32 so the error handling won't
> > work. In this code we are passing "1" as the minimum number of IRQs and
> > if it cannot allocate the minimum number of IRQs then the function
> > returns -ENOSPC. This means that it cannot return 0 here.
> >
> > Fix the signedness bug by using a "int ret;" and preserve the error
> > code instead of always returning -ENOSPC.
> >
> > Fixes: d4d7a22521c9 ("RDMA/erdma: Add the erdma module")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Since this bug is found in the initial upstream patch of our new
> driver, I would squash your changes into the relevant patch in our next
> version patch set to make the commit history cleaner.
Sure, no problem.
regards,
dan carpenter
prev parent reply other threads:[~2022-06-09 6:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 13:47 [PATCH] RDMA/erdma: signedness bug in erdma_request_vectors() Dan Carpenter
2022-06-09 3:00 ` Cheng Xu
2022-06-09 6:58 ` Dan Carpenter [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=20220609065856.GV2168@kadam \
--to=dan.carpenter@oracle.com \
--cc=chengyou@linux.alibaba.com \
--cc=jgg@ziepe.ca \
--cc=kaishen@linux.alibaba.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
/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.