[PATCH 2/2] lguest: handle new paravirt lazy mode (fix userspacesegfaults)

From: Rusty Russell
Date: Sun Apr 29 2007 - 09:37:46 EST


There's a new paravirt_lazy_mode mode in town.

Well, it's spelled "mode", but it's pronounced "hack".

Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
---
drivers/lguest/lguest.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

===================================================================
--- a/drivers/lguest/lguest.c
+++ b/drivers/lguest/lguest.c
@@ -59,9 +59,13 @@ static enum paravirt_lazy_mode lazy_mode
static enum paravirt_lazy_mode lazy_mode;
static void lguest_lazy_mode(enum paravirt_lazy_mode mode)
{
- lazy_mode = mode;
- if (mode == PARAVIRT_LAZY_NONE)
+ if (mode == PARAVIRT_LAZY_FLUSH)
hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0);
+ else {
+ lazy_mode = mode;
+ if (mode == PARAVIRT_LAZY_NONE)
+ hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0);
+ }
}

static void lazy_hcall(unsigned long call,


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/