Hi Francois,
On Sat, Sep 5, 2026 at 4:08 PM Francois Romieu [off-list ref] wrote:
The current code may avoid concurrent run (#1) of t21142_start_nway and
t21142_media_task. It may also deadlock (#2) as you have noticed.
As far as I understand the code, current users - if any - may experience
#1 (avoid concurrent run) or #2 (deadlock) alone as well as #1 and #2
Users of modified code won't experience #2 but they may fail more often
at #1.
It may deserve a minor comment explaining either the choice or why it is
not an issue.
Thanks for catching that, you're right that swapping to mod_timer()
alone loses the pending-timer protection timer_delete_sync() gave for
free. I'll put out a v2 reorders to mod_timer() before
t21142_start_nway(), which
should restore it for the pending case; I don't think anything short
of cancel_work_sync() on media_work covers the already-queued case,
which the old code didn't either.
Magnus