diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-12-17 18:29:57 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-12-17 18:29:57 -0500 |
commit | c924aff853bdc1c9841dd22440f931fba5ab3a59 (patch) | |
tree | eaf325f35e46f8d76514fa357326d78590eafd7f /arch/arm/mm | |
parent | 5a059f1ac0ed0c937257027aed5da50241f5ec2b (diff) |
[ARM] Fix BUG()s in ioremap() code
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>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/ioremap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 3bb3951920bc..251685fe73a8 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -292,6 +292,8 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, | |||
292 | if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) | 292 | if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) |
293 | return NULL; | 293 | return NULL; |
294 | 294 | ||
295 | size = PAGE_ALIGN(size); | ||
296 | |||
295 | area = get_vm_area(size, VM_IOREMAP); | 297 | area = get_vm_area(size, VM_IOREMAP); |
296 | if (!area) | 298 | if (!area) |
297 | return NULL; | 299 | return NULL; |