projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[cascardo/linux.git]
/
mm
/
vmalloc.c
diff --git
a/mm/vmalloc.c
b/mm/vmalloc.c
index
cf7ad1a
..
e11475c
100644
(file)
--- a/
mm/vmalloc.c
+++ b/
mm/vmalloc.c
@@
-1105,7
+1105,7
@@
EXPORT_SYMBOL_GPL(vm_unmap_aliases);
*/
void vm_unmap_ram(const void *mem, unsigned int count)
{
*/
void vm_unmap_ram(const void *mem, unsigned int count)
{
- unsigned long size = count << PAGE_SHIFT;
+ unsigned long size =
(unsigned long)
count << PAGE_SHIFT;
unsigned long addr = (unsigned long)mem;
BUG_ON(!addr);
unsigned long addr = (unsigned long)mem;
BUG_ON(!addr);
@@
-1140,7
+1140,7
@@
EXPORT_SYMBOL(vm_unmap_ram);
*/
void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t prot)
{
*/
void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t prot)
{
- unsigned long size = count << PAGE_SHIFT;
+ unsigned long size =
(unsigned long)
count << PAGE_SHIFT;
unsigned long addr;
void *mem;
unsigned long addr;
void *mem;
@@
-1574,14
+1574,15
@@
void *vmap(struct page **pages, unsigned int count,
unsigned long flags, pgprot_t prot)
{
struct vm_struct *area;
unsigned long flags, pgprot_t prot)
{
struct vm_struct *area;
+ unsigned long size; /* In bytes */
might_sleep();
if (count > totalram_pages)
return NULL;
might_sleep();
if (count > totalram_pages)
return NULL;
- area = get_vm_area_caller((count << PAGE_SHIFT), flags,
-
__builtin_return_address(0));
+ size = (unsigned long)count << PAGE_SHIFT;
+
area = get_vm_area_caller(size, flags,
__builtin_return_address(0));
if (!area)
return NULL;
if (!area)
return NULL;