From: Jens Axboe <axboe@fb.com>
To: "Javier González" <jg@lightnvm.io>, "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>
Subject: Re: [PATCH] nvme: lightnvm: fix memory leak
Date: Tue, 9 May 2017 08:49:12 -0600 [thread overview]
Message-ID: <42485a11-e9ba-93a1-33bb-1059edae9d3a@fb.com> (raw)
In-Reply-To: <FFAA9DA2-8A84-4C03-AFED-82F4BE10985B@lightnvm.io>
On 05/09/2017 07:59 AM, Javier González wrote:
>> 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>
Added for this series.
--
Jens Axboe
prev parent reply other threads:[~2017-05-09 14:50 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
2017-05-09 14:49 ` Jens Axboe [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=42485a11-e9ba-93a1-33bb-1059edae9d3a@fb.com \
--to=axboe@fb.com \
--cc=hch@lst.de \
--cc=jg@lightnvm.io \
--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
Powered by JetHome