From: "Javier González" <jg@lightnvm.io>
To: Rakesh Pandit <rakesh@tuxera.com>
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
"Matias Bjørling" <matias@cnexlabs.com>,
"Christoph Hellwig" <hch@lst.de>, "Jens Axboe" <axboe@fb.com>
Subject: Re: [PATCH] nvme: lightnvm: fix memory leak
Date: Tue, 9 May 2017 15:59:43 +0200 [thread overview]
Message-ID: <FFAA9DA2-8A84-4C03-AFED-82F4BE10985B@lightnvm.io> (raw)
In-Reply-To: <20170509135506.GA22624@dhcp-216.srv.tuxera.com>
[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]
> On 9 May 2017, at 15.55, Rakesh Pandit <rakesh@tuxera.com> wrote:
>
> Free up kmalloc allocated memory if failure happens while handling L2P
> table transfer in nvme_nvm_get_l2p_tbl.
>
> Fixes: 8e79b5cb ("lightnvm: move block provisioning to targets")
> Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
> ---
> drivers/nvme/host/lightnvm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
> index 206bfdb..f5df78e 100644
> --- a/drivers/nvme/host/lightnvm.c
> +++ b/drivers/nvme/host/lightnvm.c
> @@ -367,7 +367,8 @@ static int nvme_nvm_get_l2p_tbl(struct nvm_dev *nvmdev, u64 slba, u32 nlb,
>
> if (unlikely(elba > nvmdev->total_secs)) {
> pr_err("nvm: L2P data from device is out of bounds!\n");
> - return -EINVAL;
> + ret = -EINVAL;
> + goto out;
> }
>
> /* Transform physical address to target address space */
> --
> 2.5.5
Looks good. Thanks Rakesh.
Reviewed-by: Javier González <javier@cnexlabs.com>
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2017-05-09 13:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 13:55 Rakesh Pandit
2017-05-09 13:59 ` Javier González [this message]
2017-05-09 14:49 ` Jens Axboe
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=FFAA9DA2-8A84-4C03-AFED-82F4BE10985B@lightnvm.io \
--to=jg@lightnvm.io \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=matias@cnexlabs.com \
--cc=rakesh@tuxera.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
all inboxes | Powered by JetHome®