]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
parisc: fix wrong page aligned size calculation in ioremapping code
authorFlorian Zumbiehl <florz@florz.de>
Wed, 11 Aug 2010 21:17:33 +0000 (14:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
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 <florz@florz.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Acked-by: Helge Deller <deller@gmx.de>
Tested-by: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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..