linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
	Jack Morgenstein <jackm@dev.mellanox.co.il>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Moni Shoua <monis@mellanox.com>,
	Parav Pandit <parav@mellanox.com>,
	Leon Romanovsky <leonro@mellanox.com>
Subject: Re: [PATCH rdma-rc] IB/mlx4: Fix memory leak in add_gid error flow
Date: Thu, 16 Jan 2020 16:14:39 -0400	[thread overview]
Message-ID: <20200116201439.GA4343@ziepe.ca> (raw)
In-Reply-To: <20200115085050.73746-1-leon@kernel.org>

On Wed, Jan 15, 2020 at 10:50:50AM +0200, Leon Romanovsky wrote:
> From: Jack Morgenstein <jackm@dev.mellanox.co.il>
> 
> In procedure mlx4_ib_add_gid(), if the driver is unable to
> update the FW gid table, there is a memory leak in the driver's
> copy of the gid table: the gid entry's context buffer is not freed.
> 
> If such an error occurs, free the entry's context buffer, and mark the
> entry as available (by setting its context pointer to NULL).
> 
> Fixes: e26be1bfef81 ("IB/mlx4: Implement ib_device callbacks")
> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
> Reviewed-by: Parav Pandit <parav@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  drivers/infiniband/hw/mlx4/main.c | 20 ++++++++++++++++----
>  1 file changed, 16 insertions(+), 4 deletions(-)

Applied to for-next, thanks

Jason

      reply	other threads:[~2020-01-16 20:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15  8:50 [PATCH rdma-rc] IB/mlx4: Fix memory leak in add_gid error flow Leon Romanovsky
2020-01-16 20:14 ` 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=20200116201439.GA4343@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=dledford@redhat.com \
    --cc=jackm@dev.mellanox.co.il \
    --cc=leon@kernel.org \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=monis@mellanox.com \
    --cc=parav@mellanox.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;
as well as URLs for NNTP newsgroup(s).