linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Klein <asklein@cip.physik.uni-wuerzburg.de>
To: linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com, mantel@suse.de
Subject: ioremap off by one bug
Date: Thu, 6 Mar 2003 22:58:09 +0100 (MET)	[thread overview]
Message-ID: <Pine.GHP.4.21.0303062253390.5677-100000@wpax13.physik.uni-wuerzburg.de> (raw)


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!   |
|___________________________________|




                 reply	other threads:[~2003-03-06 21:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GHP.4.21.0303062253390.5677-100000@wpax13.physik.uni-wuerzburg.de \
    --to=asklein@cip.physik.uni-wuerzburg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mantel@suse.de \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).