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, 10 Nov 2009 13:15:36 -0500
From:	Andres Salomon <dilinger@...labora.co.uk>
To:	linux-kernel@...r.kernel.org
Cc:	Vincent Sanders <vince@...tec.co.uk>,
	Simtec Linux Team <linux@...tec.co.uk>,
	akpm@...ux-foundation.org, krzysztof.h1@...pl, lethal@...ux-sh.org
Subject:  Re: SM501: Fix missing uses of resource_size()

On Tue, 10 Nov 2009 17:17:34 +0000
Ben Dooks <ben@...tec.co.uk> wrote:

> There are several places in the SM501 fb driver that could do with
> using resource_size() to calculate the size of a resource.
> 

Yes, please!  Also, as Thiago suggested, please submit this inline.

[...]
> @@ -1363,7 +1363,7 @@ static int sm501fb_start(struct sm501fb_
>  	}
>  
>  	info->fbmem_res = request_mem_region(res->start,
> -					     (res->end -
> res->start)+1,
> +					     resource_size(res),
>  					     pdev->name);
>  	if (info->fbmem_res == NULL) {
>  		dev_err(dev, "cannot claim framebuffer\n");
> @@ -1377,7 +1377,7 @@ static int sm501fb_start(struct sm501fb_

Looks like you missed one here; the ioremap on line 1374 should also
use resource_size.


>  		goto err_mem_res;
>  	}
>  
> -	info->fbmem_len = (res->end - res->start)+1;
> +	info->fbmem_len = resource_size(res);
>  
>  	/* clear framebuffer memory - avoids garbage data on unused
> fb */ memset(info->fbmem, 0, info->fbmem_len);
> 


--
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