diff options
author | Florian Zumbiehl <florz@florz.de> | 2010-07-20 18:19:47 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-07-20 19:56:35 -0400 |
commit | 468c30f2bbdf1ba0fbf16667eade23a46eaa8f06 (patch) | |
tree | 6822a6db298f5ae6a39fd317d00c3181c7982506 /arch | |
parent | 92851e2fca48f1893f899963c13b55b61ac6956c (diff) |
x86, iomap: Fix wrong page aligned size calculation in ioremapping code
x86 early_iounmap(): fix off-by-one error in page alignment of allocation
size for sizes where size%PAGE_SIZE==1.
Signed-off-by: Florian Zumbiehl <florz@florz.de>
LKML-Reference: <201007202219.o6KMJlES021058@imap1.linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/mm/ioremap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index d41d3a9036ca..3ba6e0608c55 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -611,7 +611,7 @@ void __init early_iounmap(void __iomem *addr, unsigned long size) | |||
611 | return; | 611 | return; |
612 | } | 612 | } |
613 | offset = virt_addr & ~PAGE_MASK; | 613 | offset = virt_addr & ~PAGE_MASK; |
614 | nrpages = PAGE_ALIGN(offset + size - 1) >> PAGE_SHIFT; | 614 | nrpages = PAGE_ALIGN(offset + size) >> PAGE_SHIFT; |
615 | 615 | ||
616 | idx = FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*slot; | 616 | idx = FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*slot; |
617 | while (nrpages > 0) { | 617 | while (nrpages > 0) { |