From: Ciprian Costea <ciprianmarian.costea@oss.nxp.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
Vincent Mailhol <mailhol@kernel.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Cc: linux-can@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, imx@lists.linux.dev, s32@nxp.com,
Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
Subject: [PATCH v2 2/2] can: at91_can: add missing can_rx_offload_del() in at91_can_remove()
Date: Tue, 1 Sep 2026 10:39:27 +0200 [thread overview]
Message-ID: <20260901083927.316283-3-ciprianmarian.costea@oss.nxp.com> (raw)
In-Reply-To: <20260901083927.316283-1-ciprianmarian.costea@oss.nxp.com>
From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
at91_can_probe() sets up rx-offload via can_rx_offload_add_timestamp(),
but at91_can_remove() never calls can_rx_offload_del(). The NAPI
instance added by can_rx_offload_add_timestamp() is therefore never
removed on unbind.
This was benign while the offload's IRQ queue was embedded in struct
can_rx_offload, but it now leaks the per-CPU skb_irq_queue allocation.
Add the missing can_rx_offload_del() after unregister_netdev().
Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
---
drivers/net/can/at91_can.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 58da323f14d7..3ee908817add 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -1165,6 +1165,8 @@ static void at91_can_remove(struct platform_device *pdev)
unregister_netdev(dev);
+ can_rx_offload_del(&priv->offload);
+
iounmap(priv->reg_base);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--
2.43.0
next prev parent reply other threads:[~2026-09-01 8:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 8:39 [PATCH v2 0/2] can: rx-offload: make skb_irq_queue per-CPU Ciprian Costea
2026-09-01 8:39 ` [PATCH v2 1/2] " Ciprian Costea
2026-09-01 8:56 ` sashiko-bot
2026-09-01 8:39 ` Ciprian Costea [this message]
2026-09-01 8:49 ` [PATCH v2 2/2] can: at91_can: add missing can_rx_offload_del() in at91_can_remove() sashiko-bot
2026-09-01 9:02 ` Ciprian Marian Costea
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=20260901083927.316283-3-ciprianmarian.costea@oss.nxp.com \
--to=ciprianmarian.costea@oss.nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=dev.kurt@vandijck-laurijssen.be \
--cc=imx@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=mkl@pengutronix.de \
--cc=nicolas.ferre@microchip.com \
--cc=s32@nxp.com \
/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