All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Zhu Yanjun <yanjun.zhu@linux.dev>, Chuck Lever <chuck.lever@oracle.com>
Cc: Yi Zhang <yi.zhang@redhat.com>,
	Guoqing Jiang <guoqing.jiang@linux.dev>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	leonro@nvidia.com, chuck.lever@oracle.com
Subject: Re: [bug report][bisected] kmemleak in rdma_core observed during blktests nvme/rdma use siw
Date: Wed, 8 May 2024 12:56:37 -0300	[thread overview]
Message-ID: <20240508155637.GL4650@nvidia.com> (raw)
In-Reply-To: <9eb4ed5e-0872-40fd-ab96-e210463d82ee@linux.dev>

On Wed, May 08, 2024 at 05:31:00PM +0200, Zhu Yanjun wrote:
> 在 2024/5/8 15:08, Yi Zhang 写道:
> > So bisect shows it was introduced with below commit, please help check
> > and fix it, thanks.
> > 
> > commit f8ef1be816bf9a0c406c696368c2264a9597a994
> > Author: Chuck Lever <chuck.lever@oracle.com>
> > Date:   Mon Jul 17 11:12:32 2023 -0400
> > 
> >      RDMA/cma: Avoid GID lookups on iWARP devices
> 
> Not sure if the following can fix this problem or not.
> Please let me know the test result.
> Thanks a lot.
> 
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> index 1e2cd7c8716e..901e6c40d560 100644
> --- a/drivers/infiniband/core/cma.c
> +++ b/drivers/infiniband/core/cma.c
> @@ -715,9 +715,13 @@ cma_validate_port(struct ib_device *device, u32 port,
>                 rcu_read_lock();
>                 ndev = rcu_dereference(sgid_attr->ndev);
>                 if (!net_eq(dev_net(ndev), dev_addr->net) ||
> -                   ndev->ifindex != bound_if_index)
> +                   ndev->ifindex != bound_if_index) {
> +                       rdma_put_gid_attr(sgid_attr);
>                         sgid_attr = ERR_PTR(-ENODEV);
> +               }
>                 rcu_read_unlock();
> +               if (!IS_ERR(sgid_attr))
> +                       rdma_put_gid_attr(sgid_attr);
>                 goto out;
>         }

That does look needed regardless!

Chuck?

Jason

  reply	other threads:[~2024-05-08 15:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  6:03 [bug report] kmemleak in rdma_core observed during blktests nvme/rdma use siw Yi Zhang
2024-04-08  6:39 ` Leon Romanovsky
2024-04-08  6:57   ` Leon Romanovsky
2024-04-24 13:28 ` Guoqing Jiang
2024-04-26  5:56   ` Yi Zhang
2024-04-26  8:44     ` Yi Zhang
2024-04-28  2:54       ` Guoqing Jiang
2024-04-28 12:42         ` Yi Zhang
2024-04-29  0:53           ` Guoqing Jiang
2024-04-30 11:51             ` Yi Zhang
2024-05-08 13:08               ` [bug report][bisected] " Yi Zhang
2024-05-08 14:37                 ` Zhu Yanjun
2024-05-08 15:31                 ` Zhu Yanjun
2024-05-08 15:56                   ` Jason Gunthorpe [this message]
2024-05-08 16:19                     ` Chuck Lever
2024-05-10  1:41                   ` Yi Zhang
2024-05-10 11:10                     ` Zhu Yanjun
     [not found]                     ` <a6b11edf-99e0-43bc-b49e-e0d6e201266b@linux.dev>
     [not found]                       ` <CAHj4cs9XsHiKeVGNRjTCcg87ghWrDm972VMq+5w=8jvetjFG0w@mail.gmail.com>
2024-05-10 15:52                         ` Zhu Yanjun
2024-04-24 15:57 ` [bug report] " Zhu Yanjun

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=20240508155637.GL4650@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=chuck.lever@oracle.com \
    --cc=guoqing.jiang@linux.dev \
    --cc=leonro@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=shinichiro.kawasaki@wdc.com \
    --cc=yanjun.zhu@linux.dev \
    --cc=yi.zhang@redhat.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 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.