parisc: fix wrong page aligned size calculation in ioremapping code
authorFlorian Zumbiehl <[email protected]>
Wed, 11 Aug 2010 21:17:33 +0000 (14:17 -0700)
committerLinus Torvalds <[email protected]>
Thu, 12 Aug 2010 15:43:29 +0000 (08:43 -0700)
parisc __ioremap(): fix off-by-one error in page alignment of allocation
size for sizes where size%PAGE_SIZE==1.

Signed-off-by: Florian Zumbiehl <[email protected]>
Cc: Kyle McMartin <[email protected]>
Acked-by: Helge Deller <[email protected]>
Tested-by: Helge Deller <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/parisc/mm/ioremap.c

index 92d496ad07c97b9be730f8799bf96f7c5a538d3b..838d0259cd2715e034ce7787eba12ac4cc7ae9c4 100644 (file)
@@ -71,7 +71,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
         */
        offset = phys_addr & ~PAGE_MASK;
        phys_addr &= PAGE_MASK;
-       size = PAGE_ALIGN(last_addr) - phys_addr;
+       size = PAGE_ALIGN(last_addr + 1) - phys_addr;
 
        /*
         * Ok, go for it..