]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Panic_Panic needs to set mxInPanic flag
authorVMware, Inc <>
Thu, 24 Feb 2011 21:41:32 +0000 (13:41 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Thu, 24 Feb 2011 21:41:32 +0000 (13:41 -0800)
The userlock module relies on this flag to not get into a panic loop
from lock rank violation when we are trying to dump core.  This is
the default Panic() implementation used by UI and other apps.  For
other apps that stub out Panic(), they are not likely to use MXUser
locks.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/panic/panic.c

index 937a90e60969719bf6c4ad6f75f548944c05e495..6245e8d20457b02fb5a80b18efd4bf1a4839322d 100644 (file)
@@ -41,6 +41,7 @@
 #include "str.h"
 #include "config.h"
 #include "util.h"
+#include "userlock.h"
 #if defined(_WIN32) || !defined(VMX86_TOOLS)
 #include "coreDump.h"
 #endif
@@ -465,6 +466,8 @@ Panic_Panic(const char *format,
    char buf[1024];
    static int count = 0;
 
+   MXUser_SetInPanic();
+
    Str_Vsnprintf(buf, sizeof buf, format, args);
 
    /*