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, 6 Mar 2014 11:32:12 +0200
From:	Tomi Valkeinen <tomi.valkeinen@...com>
To:	Wang YanQing <udknight@...il.com>
CC:	<plagnioj@...osoft.com>, <fengguang.wu@...el.com>,
	<linux-fbdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] video: fbdev: uvesafb: Remove impossible code path in
 uvesafb_init_info

On 05/03/14 17:56, Wang YanQing wrote:
> Because uvesafb_vbe_init will fail when get zero avaiable modes,
> and we have checked the return value of uvesafb_vbe_init_mode,
> so it is impossible to pass NULL as mode into uvesafb_init_info.
> 
> [ This patch fix warning report by fengguang.wu@...el.com
>   "drivers/video/fbdev/uvesafb.c:1509 uvesafb_init_info()
>    error: we previously assumed 'mode' could be null" ]
> 
> Signed-off-by: Wang YanQing <udknight@...il.com>
> ---
>  drivers/video/fbdev/uvesafb.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
> index 18352b2..509d452 100644
> --- a/drivers/video/fbdev/uvesafb.c
> +++ b/drivers/video/fbdev/uvesafb.c
> @@ -1474,12 +1474,7 @@ static void uvesafb_init_info(struct fb_info *info, struct vbe_mode_ib *mode)
>  	 *                 used video mode, i.e. the minimum amount of
>  	 *                 memory we need.
>  	 */
> -	if (mode != NULL) {
> -		size_vmode = info->var.yres * mode->bytes_per_scan_line;
> -	} else {
> -		size_vmode = info->var.yres * info->var.xres *
> -			     ((info->var.bits_per_pixel + 7) >> 3);
> -	}
> +	size_vmode = info->var.yres * mode->bytes_per_scan_line;
>  
>  	/*
>  	 *   size_total -- all video memory we have. Used for mtrr
> 

Thanks, queuing for 3.15.

 Tomi



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ