Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
	Leon Romanovsky <leonro@nvidia.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	<linux-rdma@vger.kernel.org>
Subject: Re: [PATCH rdma-next] RDMA/restrack: Don't treat as an error allocation ID wrapping
Date: Thu, 7 Jan 2021 14:32:19 -0400
Message-ID: <20210107183219.GA916909@nvidia.com> (raw)
In-Reply-To: <20201216100753.1127638-1-leon@kernel.org>

On Wed, Dec 16, 2020 at 12:07:53PM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> xa_alloc_cyclic() call returns positive number if ID allocation
> succeeded but wrapped. It is not an error, so normalize the "ret"
> variable to zero as marker of not-an-error.
> 
>    drivers/infiniband/core/restrack.c:261 rdma_restrack_add()
>    warn: 'ret' can be either negative or positive
> 
> Fixes: fd47c2f99f04 ("RDMA/restrack: Convert internal DB from hash to XArray")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  drivers/infiniband/core/restrack.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to for-rc, thanks

Jason

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16 10:07 Leon Romanovsky
2021-01-07 18:32 ` Jason Gunthorpe [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=20210107183219.GA916909@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dledford@redhat.com \
    --cc=leon@kernel.org \
    --cc=leonro@nvidia.com \
    --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

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git