All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Alex Dewar <alex.dewar90@gmail.com>
Cc: Doug Ledford <dledford@redhat.com>,
	Leon Romanovsky <leon@kernel.org>, <linux-rdma@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] RDMA/ucma: Fix resource leak on error path
Date: Wed, 2 Sep 2020 17:10:57 -0300	[thread overview]
Message-ID: <20200902201057.GA1463739@nvidia.com> (raw)
In-Reply-To: <20200902162454.332828-1-alex.dewar90@gmail.com>

On Wed, Sep 02, 2020 at 05:24:51PM +0100, Alex Dewar wrote:
> In ucma_process_join(), if the call to xa_alloc() fails, the function
> will return without freeing mc. Fix this by jumping to the correct line.
> 
> In the process I renamed the jump labels to something more memorable for
> extra clarity.
> 
> Addresses-Coverity: ("Resource leak")
> Fixes: 95fe51096b7a ("RDMA/ucma: Remove mc_list and rely on xarray")
> Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>

Applied to for-next, thanks

Jason

  reply	other threads:[~2020-09-02 20:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 16:24 [PATCH] RDMA/ucma: Fix resource leak on error path Alex Dewar
2020-09-02 20:10 ` Jason Gunthorpe [this message]
2020-09-03  0:34 ` Gustavo A. R. Silva
2020-09-03  0:32   ` Jason Gunthorpe
2020-09-03  0:40     ` Gustavo A. R. Silva
2020-09-03  9:35   ` Alex Dewar

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=20200902201057.GA1463739@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=alex.dewar90@gmail.com \
    --cc=dledford@redhat.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 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.