From: Liu Chao <liuc63@xiaopeng.com>
To: Robin van der Gracht <robin@protonic.nl>,
Oleksij Rempel <o.rempel@pengutronix.de>,
Oliver Hartkopp <socketcan@hartkopp.net>,
Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Vincent Mailhol <mailhol@kernel.org>,
kernel@pengutronix.de, linux-can@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] can: j1939: check received packet count before completing session
Date: Thu, 10 Sep 2026 02:05:54 +0800 [thread overview]
Message-ID: <20260909180554.365350-1-liuc63@xiaopeng.com> (raw)
In-Reply-To: <20260908145715.D70BD1F00A3D@smtp.kernel.org>
Addressed in v2:
https://lore.kernel.org/all/20260909173105.158202-1-liuc63@xiaopeng.com/
> Does this inadvertently suppress the diagnostic warning for EOMA size
> mismatches on transmitter sessions?
Yes. v2 emits the warning for both rx and tx and gates only the abort on
!session->transmission.
> Could this error path cause a permanent leak of the session structure
> and permanently block the SA/DA address pair?
v2 returns early for sessions already in J1939_SESSION_WAITING_ABORT, so
the deactivation timer armed by the earlier abort keeps running. Same
failure mode as 1809c82aa073 ("net: can: j1939:
j1939_xtp_rx_rts_session_active(): deactivate session upon receiving the
second rts"). j1939_session_cancel() is fragile here in general -- the
cts_one and dat_one cancel paths are still unguarded -- but that is a
separate patch.
> This is a pre-existing issue, but looking at j1939_session_cancel()
> exposed by this path, could it trigger an AB-BA deadlock?
Pre-existing, and this series adds no new locking: j1939_xtp_rx_eoma_one()
calls j1939_session_cancel() from the same RX softirq context as the
existing cts_one and dat_one cancel paths, so the reachability of the
cycle is unchanged. Fixing it means restructuring how
j1939_session_cancel() cancels the rxtimer under active_session_list_lock;
that is a separate change.
prev parent reply other threads:[~2026-09-09 18:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 14:56 [PATCH 0/2] can: j1939: tighten TP receive-path checks Liu Chao
2026-09-07 14:56 ` [PATCH 1/2] can: j1939: reject TP RTS with wrong packet count Liu Chao
2026-09-07 14:56 ` [PATCH 2/2] can: j1939: check received packet count before completing session Liu Chao
2026-09-08 14:57 ` sashiko-bot
2026-09-09 18:05 ` Liu Chao [this message]
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=20260909180554.365350-1-liuc63@xiaopeng.com \
--to=liuc63@xiaopeng.com \
--cc=kernel@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.