mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/mm/init.c: devmem_is_allowed() off by one
@ 2012-08-29  3:21 T Makphaibulchoke
  2012-09-14  6:20 ` [tip:x86/urgent] x86/mm/init.c: Fix " tip-bot for T Makphaibulchoke
  0 siblings, 1 reply; 2+ messages in thread
From: T Makphaibulchoke @ 2012-08-29  3:21 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86, akpm, yinghai, tiwai, dhowells, linux-kernel
  Cc: T Makphaibulchoke

Fixing an off-by-one error in devmem_is_allowed(), which allows accesses to
physical addresses 0x100000-0x100fff, an extra page past 1MB.

Signed-off-by: T Makphaibulchoke <tmac@hp.com>
---
 arch/x86/mm/init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index e0e6990..ab1f6a9 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -319,7 +319,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
  */
 int devmem_is_allowed(unsigned long pagenr)
 {
-	if (pagenr <= 256)
+	if (pagenr < 256)
 		return 1;
 	if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
 		return 0;
-- 
1.7.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-14  6:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-29  3:21 [PATCH] x86/mm/init.c: devmem_is_allowed() off by one T Makphaibulchoke
2012-09-14  6:20 ` [tip:x86/urgent] x86/mm/init.c: Fix " tip-bot for T Makphaibulchoke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome