lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-468c30f2bbdf1ba0fbf16667eade23a46eaa8f06@git.kernel.org>
Date:	Wed, 21 Jul 2010 00:41:00 GMT
From:	tip-bot for Florian Zumbiehl <florz@...rz.de>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, florz@...rz.de, hpa@...or.com,
	mingo@...hat.com, akpm@...ux-foundation.org, tglx@...utronix.de,
	hpa@...ux.intel.com
Subject: [tip:x86/mm] x86, iomap: Fix wrong page aligned size calculation in ioremapping code

Commit-ID:  468c30f2bbdf1ba0fbf16667eade23a46eaa8f06
Gitweb:     http://git.kernel.org/tip/468c30f2bbdf1ba0fbf16667eade23a46eaa8f06
Author:     Florian Zumbiehl <florz@...rz.de>
AuthorDate: Tue, 20 Jul 2010 15:19:47 -0700
Committer:  H. Peter Anvin <hpa@...ux.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@...rz.de>
LKML-Reference: <201007202219.o6KMJlES021058@...p1.linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@...ux.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) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ