lkml.org 
[lkml]   [2011]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] xen: off by one error in xen/setup.c
Date
Do not try to initialize pfn beyond of available address space.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
arch/x86/xen/setup.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 60aeeb5..2221b05 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -69,7 +69,7 @@ static void __init xen_add_extra_mem(unsigned long pages)

xen_max_p2m_pfn = PFN_DOWN(extra_start + size);

- for (pfn = PFN_DOWN(extra_start); pfn <= xen_max_p2m_pfn; pfn++)
+ for (pfn = PFN_DOWN(extra_start); pfn < xen_max_p2m_pfn; ++pfn)
__set_phys_to_machine(pfn, INVALID_P2M_ENTRY);
}

--
1.7.5


\
 
 \ /
  Last update: 2011-08-02 11:49    [W:0.077 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site