[PATCH] os: BUG_WARN about setting a NULL timer in the signal context

Peter Hutterer peter.hutterer at who-t.net
Wed Aug 22 21:48:46 PDT 2012


This issue has appeared in at least three input drivers, warn about it.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 os/WaitFor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/os/WaitFor.c b/os/WaitFor.c
index 393890f..7238d9b 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -416,6 +416,8 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
     register OsTimerPtr *prev;
     CARD32 now = GetTimeInMillis();
 
+    BUG_RETURN_VAL(timer == NULL && inSignalContext, NULL);
+
     if (!timer) {
         timer = malloc(sizeof(struct _OsTimerRec));
         if (!timer)
-- 
1.7.11.2



More information about the xorg-devel mailing list