Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Ryan Cai <ryancaicse@gmail.com>
Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: mlx5: memory leaks
Date: Fri, 14 Jan 2022 11:10:31 +0200	[thread overview]
Message-ID: <YeE+Bw3IoAIZZZ/h@unreal> (raw)
In-Reply-To: <76193B8E-6A8B-4FF9-B6BB-A3A17FB74A61@gmail.com>

On Thu, Jan 13, 2022 at 12:37:10PM +0800, Ryan Cai wrote:
> Hi, Kernel Maintainers,
> 
>     In method mlx5_ib_destroy_gsi of gsi.c, there are memory leaks when ret = ib_destroy_qp(gsi->rx_qp); returns true? I think, ib_free_cq(gsi->cq); kfree(gsi->outstanding_wrs); kfree(gsi->tx_qps); should also be put before return ret before Line 180. If this is a real bug, I can send a patch. Thanks!

The ib_destroy_qp() is function that destroys kernel QP that in our
memory model shouldn't fail. The patch that converts ib_destroy_qp()
to be void is very welcomed.

See ib_destroy_srq() as an example of expected function format.

Thanks

      reply	other threads:[~2022-01-14  9:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13  4:37 mlx5: memory leaks Ryan Cai
2022-01-14  9:10 ` Leon Romanovsky [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=YeE+Bw3IoAIZZZ/h@unreal \
    --to=leon@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=ryancaicse@gmail.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