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]
Message-ID: <515AB443.4060407@ti.com>
Date:	Tue, 2 Apr 2013 13:34:43 +0300
From:	Tomi Valkeinen <tomi.valkeinen@...com>
To:	Wang YanQing <udknight@...il.com>, <spock@...too.org>,
	<linux-fbdev@...r.kernel.org>, <FlorianSchandinat@....de>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH]video:uvesafb: Fix dereference NULL pointer code path

On 2013-03-30 04:53, Wang YanQing wrote:
> platform_device_alloc could failed and return NULL,
> we should check this before call platform_device_put.
> 
> Signed-off-by: Wang YanQing <udknight@...il.com>
> ---
>  drivers/video/uvesafb.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
> index 2f8f82d..230bd45 100644
> --- a/drivers/video/uvesafb.c
> +++ b/drivers/video/uvesafb.c
> @@ -1975,7 +1975,8 @@ static int __devinit uvesafb_init(void)
>  			err = -ENOMEM;
>  
>  		if (err) {
> -			platform_device_put(uvesafb_device);
> +			if (uvesafb_device)
> +				platform_device_put(uvesafb_device);
>  			platform_driver_unregister(&uvesafb_driver);
>  			cn_del_callback(&uvesafb_cn_id);
>  			return err;
> 

Thanks, queued to fbdev fixes.

 Tomi



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ