aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2000-12-13 18:57:15 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2000-12-13 18:57:15 +0000
commit05f9877c154a641762f0f16f48c4e73898fbba77 (patch)
treea2c88d797548efa63ab2822fd02694da6613c9bf /sys
parent5dfa801a91dba41d02d0231292df883338c89e13 (diff)
downloadsrc-05f9877c154a641762f0f16f48c4e73898fbba77.tar.gz
src-05f9877c154a641762f0f16f48c4e73898fbba77.zip
If we fail to emulate a vm86 trap in kernel mode, then we use
vm86_trap() to return to the calling program directly. vm86_trap() doesn't return, thus it was never returning to trap() to release Giant. Thus, release Giant before calling vm86_trap().
Notes
Notes: svn path=/head/; revision=69987
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/trap.c1
-rw-r--r--sys/i386/i386/trap.c1
-rw-r--r--sys/kern/subr_trap.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 59745358823c..db02d51edb6c 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -467,6 +467,7 @@ restart:
/*
* returns to original process
*/
+ mtx_exit(&Giant, MTX_DEF);
vm86_trap((struct vm86frame *)&frame);
goto out;
}
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index 59745358823c..db02d51edb6c 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/trap.c
@@ -467,6 +467,7 @@ restart:
/*
* returns to original process
*/
+ mtx_exit(&Giant, MTX_DEF);
vm86_trap((struct vm86frame *)&frame);
goto out;
}
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 59745358823c..db02d51edb6c 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -467,6 +467,7 @@ restart:
/*
* returns to original process
*/
+ mtx_exit(&Giant, MTX_DEF);
vm86_trap((struct vm86frame *)&frame);
goto out;
}