[PATCH v2 12/14] Log in UnloadModuleOrDriver() in a signal safe manner

Chase Douglas chase.douglas at canonical.com
Mon Apr 9 11:17:38 PDT 2012


The function may be called from a fatal signal handler.

Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
 hw/xfree86/loader/loadmod.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index c6b5590..6cc4f95 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -1075,9 +1075,11 @@ UnloadModuleOrDriver(ModuleDescPtr mod)
         return;
 
     if (mod->parent)
-        xf86MsgVerb(X_INFO, 3, "UnloadSubModule: \"%s\"\n", mod->name);
+        LogMessageVerbSigSafe(X_INFO, 3, "UnloadSubModule: \"");
     else
-        xf86MsgVerb(X_INFO, 3, "UnloadModule: \"%s\"\n", mod->name);
+        LogMessageVerbSigSafe(X_INFO, 3, "UnloadModule: \"");
+    LogMessageVerbSigSafe(X_NONE, 3, mod->name);
+    LogMessageVerbSigSafe(X_NONE, 3, "\"\n");
 
     if (mod->TearDownData != ModuleDuplicated) {
         if ((mod->TearDownProc) && (mod->TearDownData))
-- 
1.7.9.1



More information about the xorg-devel mailing list