# Re: \[PATCH\] net: tulip: use mod\_timer() in t21142\_lnk\_change()

- From: Magnus Lindholm \<linmag7@gmail.com\>
- Date: 2026-09-05 19:25:26 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/09/17519251
- Thread: https://ratatoskr.run/netdev/2026/09/17513890/t.md

```text
Hi Francois,

On Sat, Sep 5, 2026 at 4:08 PM Francois Romieu [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
```
