All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cheng Xu <chengyou@linux.alibaba.com>
To: Dan Carpenter <dan.carpenter@oracle.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 11:00:03 +0800	[thread overview]
Message-ID: <604ea67b-fa8e-0e36-0adf-2940facfe4ee@linux.alibaba.com> (raw)
In-Reply-To: <YqCoWrAXeGHPvTfO@kili>



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.

Thanks,
Cheng Xu

  reply	other threads:[~2022-06-09  3:00 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 [this message]
2022-06-09  6:58   ` Dan Carpenter

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=604ea67b-fa8e-0e36-0adf-2940facfe4ee@linux.alibaba.com \
    --to=chengyou@linux.alibaba.com \
    --cc=dan.carpenter@oracle.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.