Skip to content

Commit f616fe4

Browse files
committed
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>
1 parent f558a84 commit f616fe4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/lguest/page_tables.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,7 @@ void guest_set_pgd(struct lguest *lg, unsigned long gpgdir, u32 idx)
10021002
kill_guest(&lg->cpus[0],
10031003
"Cannot populate switcher mapping");
10041004
}
1005+
lg->pgdirs[pgdir].last_host_cpu = -1;
10051006
}
10061007
}
10071008

0 commit comments

Comments
 (0)