Re: [PATCH can v2] can: j1939: avoid address-claim timer deadlock

From: Oleksij Rempel

Date: Fri Nov 27 2026 - 05:17:43 EST


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.

Regards,
Oleksij