> I think this should work, but I'd like to re-read these changes carefully,
> this all is subtle. 

Sure.  I meant it as a proposal for you to consider.  I didn't think
through all the corners myself.  It just seemed easier to do those commits
as the starting point for further discussion than to describe the plan and
ask you to implement it.

> OK, we need to call utrace_reset() to recalc ->utrace_flags. But 
> utrace_reset()
> assumes it is safe to play with utrace->attached list, now this is not true.

Yes, that is right.

> IOW, with this patch utrace_control(UTRACE_DETACH)->utrace_reset() can race
> with REPORT_CALLBACKS/etc which does list_for_each_entry(->attached).
> (minor, but perhaps resume should be renamed to "bool reset")

Yes, that is probably clearer.

> "task != current" before utrace_wakeup() doesn't look right too, I think we
> should check ->stopped instead. Harmless, but otherwise we can call wakeup()
> while it is not needed.

Ok.  I think I was concerned about ->stopped not always being right.  But I
think you're right that it should be.  It should not ever be set on current.

Please review commit c36a311.


Thanks,
Roland

Reply via email to