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, 24 Nov 2015 12:06:29 +0100
From:	Matias Bjørling <mb@...htnvm.io>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
CC:	linux-kernel@...r.kernel.org, linux-block@...r.kernel.org
Subject: Re: [PATCH v2 4/5] lightnvm: release dev if dma pools fails

On 11/24/2015 11:34 AM, Sudip Mukherjee wrote:
> If create_dma_pools() fails then we just returned the error code but we
> missed freeing the device.
>
> Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
> ---
>   drivers/lightnvm/core.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
> index d288996..9dd1623 100644
> --- a/drivers/lightnvm/core.c
> +++ b/drivers/lightnvm/core.c
> @@ -318,6 +318,7 @@ int nvm_register(struct request_queue *q, char *disk_name,
>   								"ppalist");
>   		if (!dev->ppalist_pool) {
>   			pr_err("nvm: could not create ppa pool\n");
> +			nvm_free(dev);
>   			return -ENOMEM;
>   		}
>   	}
>
Thanks Sudip. The nvm_free frees the registered manager. However, it 
should not be cleaned up if it failed. As nothing else is allocated 
after the registration.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ