lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 9 May 2017 15:59:43 +0200
From:   Javier González <jg@...htnvm.io>
To:     Rakesh Pandit <rakesh@...era.com>
Cc:     linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Matias Bjørling <matias@...xlabs.com>,
        Christoph Hellwig <hch@....de>, Jens Axboe <axboe@...com>
Subject: Re: [PATCH] nvme: lightnvm: fix memory leak

> On 9 May 2017, at 15.55, Rakesh Pandit <rakesh@...era.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@...era.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@...xlabs.com>


Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ