[PATCH] utrace: check QUIESCE before reporting UTRACE_SIGNAL_REPORT/HANDLER

Oleg Nesterov oleg at redhat.com
Sun Aug 30 18:59:52 UTC 2009


When utrace_get_signal() is called with interrupt || report || signal_handler,
it sets event = 0 and, unless UTRACE_SIGNAL_IGN, does the reporting. However
this is meaningless without QUIESCE in ->utrace_flags, list_for_each_entry()
will check "want & QUIESCE" anyway.

I noticed this during the testing, sometimes utrace_get_signal() returns
signr != 0 even if there are no engines with ->flag != 0. Correct, but imho
is not very clear.

Signed-off-by: Oleg Nesterov <oleg at redhat.com>

--- __UTRACE/kernel/utrace.c~8_UGS_CK_QUIESCE	2009-08-26 19:22:02.000000000 +0200
+++ __UTRACE/kernel/utrace.c	2009-08-30 20:45:41.000000000 +0200
@@ -1939,7 +1939,8 @@ int utrace_get_signal(struct task_struct
 
 		spin_unlock(&utrace->lock);
 
-		if (unlikely(report.result == UTRACE_SIGNAL_IGN))
+		if (!(task->utrace_flags & UTRACE_EVENT(QUIESCE)) ||
+		    unlikely(report.result == UTRACE_SIGNAL_IGN))
 			/*
 			 * We only got here to clear utrace->signal_handler.
 			 */




More information about the utrace-devel mailing list