summaryrefslogtreecommitdiff
path: root/drivers/lguest
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2013-05-08 04:36:55 +0400
committerRusty Russell <rusty@rustcorp.com.au>2013-05-08 05:19:18 +0400
commitf616fe4feee4000c2995d2d1e1981513bf9ab0d4 (patch)
tree9c6a8e1073cd948621c4c15875f740a33c500877 /drivers/lguest
parentf558a845c3a043d032bb247cdbe50db9202476a1 (diff)
downloadlinux-f616fe4feee4000c2995d2d1e1981513bf9ab0d4.tar.xz
lguest: clear cached last cpu when guest_set_pgd() called.
commit v3.9-rc1-53-g6d0cda9 "lguest: cache last cpu we ran on." missed one case, which causes a triple fault. The guest calls guest_set_pgd() on the top page, and we carefully remap the Switcher text page. But we didn't reset last_host_cpu, so map_switcher_in_guest() thinks the guest's regs and IDT/GDT etc are already mapped. Reported-by: Paul Bolle <pebolle@tiscali.nl> Tested-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest')
-rw-r--r--drivers/lguest/page_tables.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c
index 699187ab3800..5b9ac32801c7 100644
--- a/drivers/lguest/page_tables.c
+++ b/drivers/lguest/page_tables.c
@@ -1002,6 +1002,7 @@ void guest_set_pgd(struct lguest *lg, unsigned long gpgdir, u32 idx)
kill_guest(&lg->cpus[0],
"Cannot populate switcher mapping");
}
+ lg->pgdirs[pgdir].last_host_cpu = -1;
}
}