Netdev List
 help / color / mirror / Atom feed
From: "Cunhao Lu" <1579567540@qq.com>
To: netdev-bot+sashiko <netdev-bot+sashiko@kernel.org>
Cc: mkl <mkl@pengutronix.de>, mailhol <mailhol@kernel.org>,
	bigeasy <bigeasy@linutronix.de>, clrkwllms <clrkwllms@kernel.org>,
	rostedt <rostedt@goodmis.org>,
	linux-can <linux-can@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>, kernel <kernel@pengutronix.de>,
	heiko <heiko@sntech.de>,
	linux-rockchip <linux-rockchip@lists.infradead.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>, kuba <kuba@kernel.org>
Subject: Re: [PATCH net] can: rockchip_canfd: stop bus-off restart before closing the device
Date: Wed, 14 Oct 2026 13:03:02 +0800	[thread overview]
Message-ID: <tencent_D5994C4DC2CF087A800762B3DF5F53010D06@qq.com> (raw)
In-Reply-To: <179194843570.434549.16906326776857003512@kernel.org>

Hi,

I checked all four findings against the current branch.

> - [Medium] The patch now has rkcanfd_set_mode() return -ENETDOWN when it
>   sees priv->closing.
> - [Medium] rkcanfd_stop() publishes priv->closing = true (line 776)
>   before it masks the controller interrupts with…

The two issues involving closing were addressed in v2.

> [Severity: High]
> This isn't a bug introduced by this patch, but this patch hardens the
> restart path, so is it safe to reinitialize the timestamp delayed_work
> here?
> ...
> Would it work to call INIT_DELAYED_WORK() once at probe time, and to call
> cancel_delayed_work_sync(&priv->timestamp) in the process-context restart
> path before the timecounter is reinitialized?

Agreed. Excluding the IRQ handler does not stop the timestamp worker.
I will initialize the delayed_work once at probe time and synchronously
cancel it in the process-context restart path, after excluding the IRQ
handler and before rkcanfd_chip_start() reinitializes the timestamp
state. The bus-off IRQ path will keep its non-synchronous cancellation.


> [Severity: High]
> This is a pre-existing issue, but this hunk touches the request_irq()
> path in rkcanfd_open(). What happens to NAPI if request_irq() fails?
> ...
> Should can_rx_offload_disable(&priv->offload) be added to this error path?

Yes. I will add it to the request_irq() failure path, before stopping the
controller, to balance can_rx_offload_enable(). I will address this and
the timestamp work issue in separate patches.

I will fix these bugs in v3.

Regards,
Cunhao Lu

      reply	other threads:[~2026-10-14  5:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13  3:22 [PATCH net] can: rockchip_canfd: stop bus-off restart before closing the device Cunhao Lu
2026-10-13  3:29 ` netdev-bot+sinfo
2026-10-13  6:39   ` Cunhao Lu
2026-10-13 10:58 ` Marc Kleine-Budde
2026-10-13 13:06   ` Cunhao Lu
2026-10-13 14:27     ` Marc Kleine-Budde
2026-10-13 14:41 ` Marc Kleine-Budde
2026-10-14  3:27 ` netdev-bot+sashiko
2026-10-14  5:03   ` Cunhao Lu [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=tencent_D5994C4DC2CF087A800762B3DF5F53010D06@qq.com \
    --to=1579567540@qq.com \
    --cc=bigeasy@linutronix.de \
    --cc=clrkwllms@kernel.org \
    --cc=heiko@sntech.de \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mailhol@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.kernel.org \
    /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