lkml.org 
[lkml]   [2003]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectioremap off by one bug

Hello,

we have found an off by one bug in ioremap.
The following patch fixes the problem.

--- arch/i386/mm/ioremap.c.orig 2003-03-06 23:16:12.000000000 +0100
+++ arch/i386/mm/ioremap.c 2003-03-06 23:16:30.000000000 +0100
@@ -142,7 +142,7 @@
*/
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..

bye,

-- Andreas Klein
asklein@cip.physik.uni-wuerzburg.de
root / webmaster @cip.physik.uni-wuerzburg.de
root / webmaster @www.physik.uni-wuerzburg.de
_____________________________________
| |
| Long live our gracious AMIGA! |
|___________________________________|


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:2.411 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site