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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux