Skip to content

Commit

Permalink
[ARM] Fix BUG()s in ioremap() code
Browse files Browse the repository at this point in the history
We need to ensure that the area size is page aligned so that
remap_area_pte() doesn't increment the address past the end of
the desired area.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Dec 17, 2006
1 parent 5a059f1 commit c924aff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK))
return NULL;

size = PAGE_ALIGN(size);

area = get_vm_area(size, VM_IOREMAP);
if (!area)
return NULL;
Expand Down

0 comments on commit c924aff

Please sign in to comment.