Skip to content

Commit

Permalink
lguest: clear cached last cpu when guest_set_pgd() called.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rusty Russell committed May 8, 2013
1 parent f558a84 commit f616fe4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/lguest/page_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit f616fe4

Please sign in to comment.