summaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lguest_user.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-06-12 22:27:01 -0600
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 22:27:01 +0930
commita6c372de6e4b9a8188b66badcee3e3792eccdd26 (patch)
treeb6b67f4cc447cc0ee8ae617bb503ef7d7f6e4958 /drivers/lguest/lguest_user.c
parentb43e352139f51216a8c56b0bd5fc3d4e05c65619 (diff)
downloadop-kernel-dev-a6c372de6e4b9a8188b66badcee3e3792eccdd26.zip
op-kernel-dev-a6c372de6e4b9a8188b66badcee3e3792eccdd26.tar.gz
lguest: fix lguest wake on guest clock tick, or fd activity
The Launcher could be inside the Guest on another CPU; wake_up_process will do nothing because it is "running". kick_process will knock it back into our kernel in this case, otherwise we'll miss it until the next guest exit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/lguest_user.c')
-rw-r--r--drivers/lguest/lguest_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c
index b8ee103..bcdcf34 100644
--- a/drivers/lguest/lguest_user.c
+++ b/drivers/lguest/lguest_user.c
@@ -24,8 +24,8 @@ static int break_guest_out(struct lg_cpu *cpu, const unsigned long __user*input)
if (on) {
cpu->break_out = 1;
- /* Pop it out of the Guest (may be running on different CPU) */
- wake_up_process(cpu->tsk);
+ if (!wake_up_process(cpu->tsk))
+ kick_process(cpu->tsk);
/* Wait for them to reset it */
return wait_event_interruptible(cpu->break_wq, !cpu->break_out);
} else {
OpenPOWER on IntegriCloud