public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Florian Zumbiehl <florz@florz.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, florz@florz.de, hpa@zytor.com,
	mingo@redhat.com, akpm@linux-foundation.org, tglx@linutronix.de,
	hpa@linux.intel.com
Subject: [tip:x86/mm] x86, iomap: Fix wrong page aligned size calculation in ioremapping code
Date: Wed, 21 Jul 2010 00:41:00 GMT	[thread overview]
Message-ID: <tip-468c30f2bbdf1ba0fbf16667eade23a46eaa8f06@git.kernel.org> (raw)
In-Reply-To: <201007202219.o6KMJlES021058@imap1.linux-foundation.org>

Commit-ID:  468c30f2bbdf1ba0fbf16667eade23a46eaa8f06
Gitweb:     http://git.kernel.org/tip/468c30f2bbdf1ba0fbf16667eade23a46eaa8f06
Author:     Florian Zumbiehl <florz@florz.de>
AuthorDate: Tue, 20 Jul 2010 15:19:47 -0700
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Tue, 20 Jul 2010 16:56:35 -0700

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>
---
 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 d41d3a9..3ba6e06 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)
 		return;
 	}
 	offset = virt_addr & ~PAGE_MASK;
-	nrpages = PAGE_ALIGN(offset + size - 1) >> PAGE_SHIFT;
+	nrpages = PAGE_ALIGN(offset + size) >> PAGE_SHIFT;
 
 	idx = FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*slot;
 	while (nrpages > 0) {

           reply	other threads:[~2010-07-21  0:41 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <201007202219.o6KMJlES021058@imap1.linux-foundation.org>]

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=tip-468c30f2bbdf1ba0fbf16667eade23a46eaa8f06@git.kernel.org \
    --to=florz@florz.de \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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