From: VMware, Inc <> Date: Thu, 24 Feb 2011 21:41:32 +0000 (-0800) Subject: Panic_Panic needs to set mxInPanic flag X-Git-Tag: 2011.02.23-368700~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9857f74e133fb1659874d80bfe56c033fa296291;p=thirdparty%2Fopen-vm-tools.git Panic_Panic needs to set mxInPanic flag 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 --- diff --git a/open-vm-tools/lib/panic/panic.c b/open-vm-tools/lib/panic/panic.c index 937a90e60..6245e8d20 100644 --- a/open-vm-tools/lib/panic/panic.c +++ b/open-vm-tools/lib/panic/panic.c @@ -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); /*