mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Guo Fan <guofan5@huawei.com>
Cc: <leon@kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-rdma@vger.kernel.org>
Subject: Re: [PATCH] IB/mad: fix possible memory leak in ib_mad_post_receive_mads()
Date: Fri, 19 Jun 2020 09:24:30 -0300	[thread overview]
Message-ID: <20200619122430.GA2562811@mellanox.com> (raw)
In-Reply-To: <20200612063824.180611-1-guofan5@huawei.com>

On Fri, Jun 12, 2020 at 02:38:24PM +0800, Guo Fan wrote:
> From: Fan Guo <guofan5@huawei.com>
> 
> If ib_dma_mapping_error() returns non-zero value, ib_mad_post_receive_mads
> will jump out of loops and return -ENOMEM without freeing mad_priv. We fix
> this memory-leak problem by freeing mad_priv in this case.
> 
> Fixes: 2c34e68f4261 ("IB/mad: Check and handle potential DMA mapping errors")
> Signed-off-by: Fan Guo <guofan5@huawei.com>
> ---
>  drivers/infiniband/core/mad.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to for-rc, thanks

Jason

      reply	other threads:[~2020-06-19 12:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12  6:38 Guo Fan
2020-06-19 12:24 ` 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=20200619122430.GA2562811@mellanox.com \
    --to=jgg@nvidia.com \
    --cc=guofan5@huawei.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®