summaryrefslogtreecommitdiffstats
path: root/drivers/lguest/core.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-08-23 11:43:14 +0200
committerDavid Woodhouse <dwmw2@infradead.org>2007-08-23 11:43:14 +0200
commitac0c955d5048c2c580fa7166a89133f0fd76c125 (patch)
tree041ac4fb544c7244a1a0b35c8ceabc142d5645c1 /drivers/lguest/core.c
parent[MTD] mtdoops printk warning fixes (diff)
parentApply memory policies to top two highest zones when highest zone is ZONE_MOVABLE (diff)
downloadlinux-ac0c955d5048c2c580fa7166a89133f0fd76c125.tar.xz
linux-ac0c955d5048c2c580fa7166a89133f0fd76c125.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/lguest/core.c')
-rw-r--r--drivers/lguest/core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
index 0a46e8837d9a..4a315f08a567 100644
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -453,6 +453,11 @@ static void run_guest_once(struct lguest *lg, struct lguest_pages *pages)
* lguest_pages". */
copy_in_guest_info(lg, pages);
+ /* Set the trap number to 256 (impossible value). If we fault while
+ * switching to the Guest (bad segment registers or bug), this will
+ * cause us to abort the Guest. */
+ lg->regs->trapnum = 256;
+
/* Now: we push the "eflags" register on the stack, then do an "lcall".
* This is how we change from using the kernel code segment to using
* the dedicated lguest code segment, as well as jumping into the