From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Robin van der Gracht <robin@protonic.nl>,
kernel@pengutronix.de, Oliver Hartkopp <socketcan@hartkopp.net>,
Marc Kleine-Budde <mkl@pengutronix.de>,
linux-can@vger.kernel.org
Subject: Re: [PATCH] can: j1939: make j1939_session_activate() fail if device is no longer registered
Date: Thu, 11 Dec 2025 10:46:35 +0100 [thread overview]
Message-ID: <aTqS-6tw1eokG32E@pengutronix.de> (raw)
In-Reply-To: <33947a8d-18b2-4aa1-a4f5-5d90c4619b65@I-love.SAKURA.ne.jp>
Hi,
On Tue, Dec 09, 2025 at 06:43:12PM +0900, Tetsuo Handa wrote:
> Ping?
Sorry for delay.
> On 2025/11/25 22:39, Tetsuo Handa wrote:
> > Should we also make j1939_sk_queue_activate_next_locked() and
> > j1939_xtp_rx_rts_session_new() not to emit bogus warning message?
> linux-next-20251208 has gotten a trace with
> j1939_sk_queue_activate_next_locked() and j1939_xtp_rx_rts_session_new().
> Do we want to make these functions not to emit bogus warning message?
>
> > Is this error case rare enough to tolerate bogus warning message?
Good question. You are right, error messages do not reflect the reality.
May be something like this?
j1939_sk_queue_activate_next_locked(struct j1939_session *session)
ret = j1939_session_activate(first);
if (ret) {
if (ret == -EAGAIN || ret == -EBUSY)
netdev_warn_once(first->priv->ndev,
"%s: 0x%p: Identical session is already activated.\n",
__func__, first);
else
netdev_warn_once(first->priv->ndev,
"%s: 0x%p: Activation failed with err %i.\n",
__func__, first, ret);
first->err = ret;
goto activate_next;
}
j1939_xtp_rx_rts_session_new(struct j1939_priv *priv, struct ...
ret = j1939_session_activate(session);
if (ret) {
if (ret == -EAGAIN)
netdev_alert(priv->ndev, "%s: 0x%p: concurrent session with same addr (%02x %02x) is already active.\n",
__func__, session, skcb.addr.sa, skcb.addr.da);
else
netdev_warn(priv->ndev, "%s: 0x%p: session activation failed: %i\n",
__func__, session, ret);
j1939_session_put(session);
return NULL;
This can be done in a separate patch later.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2025-12-11 9:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 13:39 [PATCH] can: j1939: make j1939_session_activate() fail if device is no longer registered Tetsuo Handa
2025-12-09 9:43 ` Tetsuo Handa
2025-12-11 9:46 ` Oleksij Rempel [this message]
2025-12-11 9:47 ` Oleksij Rempel
2025-12-17 9:47 ` Marc Kleine-Budde
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=aTqS-6tw1eokG32E@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