Linux CAN drivers development
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: linux-can@vger.kernel.org, Marc Kleine-Budde <mkl@pengutronix.de>,
	Robin van der Gracht <robin@protonic.nl>,
	kernel@pengutronix.de, Oliver Hartkopp <socketcan@hartkopp.net>
Subject: Re: [PATCH v15 3/3] can: j1939: fix possibility of hard-lockup/deadlock in j1939_ecu_timer_cancel()
Date: Sun, 29 Nov 2026 12:29:09 +0100	[thread overview]
Message-ID: <awwMhaqnVBqQy39i@pengutronix.de> (raw)
In-Reply-To: <b0a388e4-6094-497b-9c5d-c633230a4f21@I-love.SAKURA.ne.jp>

Hi Tetsuo,

On Wed, Nov 18, 2026 at 12:57:44AM +0900, Tetsuo Handa wrote:
> Therefore, fix this problem by introducing ac_process_lock that works
> as
> an outer lock for temporarily dropping priv->lock in order to safely
> call
> hrtimer_cancel().

The approach looks right to me. Please send this patch with 2/3 as a
new small series. With the changes below, I think it is ready.

Please say in the commit message why hrtimer_try_to_cancel() is not
used here.

[...]
> +     /* serializes j1939_ac_process() processing */
> +     spinlock_t ac_process_lock;

Please say what the lock protects, not which function takes it.

Please place ac_process_lock after ents[], for example next to
active_session_list_lock. Then the "above" comments in the struct stay
correct, and the comment fix from your 20 Nov mail is not needed.

Please say in the commit message how the problem was found and how you
tested the fix. maintainer-netdev.rst asks for this in every fix.

Regards,
Oleksij

  reply	other threads:[~2026-11-29 11:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 15:56 [PATCH v15 0/3] can: j1939: make module more robust Tetsuo Handa
2026-11-17 15:56 ` [PATCH v15 1/3] can: j1939: fix possibility of UAF Tetsuo Handa
2026-11-17 15:57 ` [PATCH v15 2/3] can: j1939: fix "struct j1939_ecu" refcount leak Tetsuo Handa
2026-11-27 11:12   ` Dmitry Antipov
2026-11-29 10:34   ` Oleksij Rempel
2026-11-29 10:49     ` Tetsuo Handa
2026-11-29 15:28     ` Tetsuo Handa
2026-11-17 15:57 ` [PATCH v15 3/3] can: j1939: fix possibility of hard-lockup/deadlock in j1939_ecu_timer_cancel() Tetsuo Handa
2026-11-29 11:29   ` Oleksij Rempel [this message]
2026-11-20 11:35 ` [PATCH v15 0/3] can: j1939: make module more robust Tetsuo Handa
2026-11-27  8:32   ` Oleksij Rempel
2026-11-27 12:01     ` Tetsuo Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=awwMhaqnVBqQy39i@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=robin@protonic.nl \
    --cc=socketcan@hartkopp.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox