Re: [PATCH can v2] can: j1939: avoid address-claim timer deadlock
From: Oleksij Rempel
Date: Fri Nov 27 2026 - 06:58:54 EST
On Fri, Nov 27, 2026 at 08:46:54PM +0900, Tetsuo Handa wrote:
> On 2026/11/27 19:17, Oleksij Rempel wrote:
> > On Mon, Aug 03, 2026 at 12:15:03PM +0200, Felix Hoffmann wrote:
> >> Name the 1 ms retry interval J1939_ECU_TIMER_RETRY_DELAY_MS instead of
> >> using a literal in the callback. Track consecutive failures per ECU, reset
> >> the counter when its timer starts, and emit a warning guarded by
> >> net_ratelimit() on the fifth retry. Five is a pragmatic threshold for
> >> detecting unusual delay; it is not specified by J1939.
> >>
> >> The timer uses HRTIMER_MODE_REL_SOFT, so its callback runs from
> >> HRTIMER_SOFTIRQ with bottom halves already disabled. write_trylock() does
> >> not change bottom-half state and must therefore pair with write_unlock() on
> >> success. The write_lock_bh()/write_unlock_bh() pair is unnecessary in this
> >> context.
> >>
> >> Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
> >> Cc: stable@xxxxxxxxxxxxxxx
> >> Assisted-by: Codex:GPT5.6-Sol
> >> Signed-off-by: Felix Hoffmann <f3lix.dev@xxxxxx>
> >
> > Hi Marc,
> >
> > this patch seems to have slipped through. As far as I can see, it still
> > applies to net/main, and the bot findings on it are pre-existing
> > issues. Could you please take it, if you see no problem with it?
> >
> > Tetsuo, if I read it right, your v15 3/3 fixes the same lockup. If
> > Marc takes this patch, 3/3 would not be needed in your next version.
>
> It seems that netdev-bot+sashiko@xxxxxxxxxx failed to review the v2 patch.
> In the v1 patch, netdev-bot+sashiko@xxxxxxxxxx had a concern about likeliness of
> write_trylock(&priv->lock) failure
> ( https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260731134255.1002902-1-f3lix.dev@xxxxxx ).
> Asking for opinion from netdev-bot+sashiko@xxxxxxxxxx by re-posting the v2 patch
> after applying my "[PATCH v15 1/3]" and "[PATCH v15 2/3]" would be preferable.
Thank you, I missed that. If I read the v1 review right, the concern
about the retry still applies to v2.
So let's keep your 3/3 for this lockup. Marc, please do not take this
patch for now.
Regards,
Oleksij