Robert Bragg's 5dc331852848a38ca00a2817e5b98a1d0561b116 tightened
(ie. fixed) the checking in __get_vm_area, and it broke lguest.

lguest should pass a valid "end" parameter, not some random constant.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Robert Bragg <robert@sixbynine.org>
---
 drivers/lguest/core.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff -r f5dc1442dc61 drivers/lguest/core.c
--- a/drivers/lguest/core.c	Tue Mar 04 14:21:38 2008 +1100
+++ b/drivers/lguest/core.c	Tue Mar 04 21:06:41 2008 +1100
@@ -71,9 +71,11 @@ static __init int map_switcher(void)
 
 	/* Now we reserve the "virtual memory area" we want: 0xFFC00000
 	 * (SWITCHER_ADDR).  We might not get it in theory, but in practice
-	 * it's worked so far. */
+	 * it's worked so far.  The +1 is because __get_vm_area allocates a
+	 * guard page, so we need space for that. */
 	switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE,
-				       VM_ALLOC, SWITCHER_ADDR, VMALLOC_END);
+				     VM_ALLOC, SWITCHER_ADDR, SWITCHER_ADDR
+				     + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE);
 	if (!switcher_vma) {
 		err = -ENOMEM;
 		printk("lguest: could not map switcher pages high\n");
