Hi Ronald utrace developers
I am back...
I am upgrading my kmview support and I have stepped into a clear bug.
in utrace_reap:
--
list_for_each_entry_safe(engine, next, utrace-attached, entry) {
ops = engine-ops;
engine-ops = NULL;
engine-flags = 0;
list_move(engine-entry, detached);
/*
* If it didn't need a callback, we don't need to drop
* the lock. Now nothing else refers to this engine.
*/
if (!(engine-flags UTRACE_EVENT(REAP)))
continue;
The code following this 'if' is never executed (i.e. the reap callback never
called).
In fact it is impossible for (engine-flags UTRACE_EVENT(REAP)) to be
true given that a few statement above engine-flags has been set to 0!
To fix the bug:
clean all the events but reap:
engine-flags = UTRACE_EVENT(REAP);
or save the flag in a temporary var before cleaning it, as you do for
engine-ops.
ciao
renzo