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] [day] [month] [year] [list]
Date:	Thu, 7 Apr 2016 15:05:17 -0700
From:	Laura Abbott <labbott@...hat.com>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Arve Hjønnevåg <arve@...roid.com>,
	Riley Andrews <riandrews@...roid.com>
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: android: ion: dummy: fix dereference of ERR_PTR

On 04/07/2016 09:32 AM, Sudip Mukherjee wrote:
> ion_device_create() can fail and if it fails then it returns the error
> value in ERR_PTR.
>

Reviewed-by: Laura Abbott <labbott@...hat.com>

> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@...ethink.co.uk>
> ---
>   drivers/staging/android/ion/ion_dummy_driver.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c
> index 5678870..806e76b 100644
> --- a/drivers/staging/android/ion/ion_dummy_driver.c
> +++ b/drivers/staging/android/ion/ion_dummy_driver.c
> @@ -68,6 +68,8 @@ static int __init ion_dummy_init(void)
>   	int i, err;
>
>   	idev = ion_device_create(NULL);
> +	if (IS_ERR(idev))
> +		return PTR_ERR(idev);
>   	heaps = kcalloc(dummy_ion_pdata.nr, sizeof(struct ion_heap *),
>   			GFP_KERNEL);
>   	if (!heaps)
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ