* [PATCH 7.0.y 2/5] net: mvneta: support EPROBE_DEFER when reading MAC address
2026-08-05 10:01 [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume Arbab Haider
@ 2026-08-05 10:01 ` Arbab Haider
2026-08-05 10:01 ` [PATCH 7.0.y 3/5] net: macb: drop in-flight Tx SKBs on close Arbab Haider
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Arbab Haider @ 2026-08-05 10:01 UTC (permalink / raw)
To: stable; +Cc: linux-kernel, Rosen Penev, Simon Horman, Jakub Kicinski
From: Rosen Penev <rosenp@gmail.com>
If nvmem loads after the ethernet driver, mac address assignments will
not take effect. of_get_ethdev_address returns EPROBE_DEFER in such a
case so we need to handle that to avoid eth_hw_addr_random.
Add extra goto section to just free stats as they are allocated right
above.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260307031709.640141-1-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ Upstream commit 73a864352570fd30d942652f05bfe9340d7a2055 ]
---
drivers/net/ethernet/marvell/mvneta.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 22da95d46bef..744d6585a949 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -5620,6 +5620,8 @@ static int mvneta_probe(struct platform_device *pdev)
}
err = of_get_ethdev_address(dn, dev);
+ if (err == -EPROBE_DEFER)
+ goto err_free_stats;
if (!err) {
mac_from = "device tree";
} else {
@@ -5755,6 +5757,7 @@ static int mvneta_probe(struct platform_device *pdev)
1 << pp->id);
mvneta_bm_put(pp->bm_priv);
}
+err_free_stats:
free_percpu(pp->stats);
err_free_ports:
free_percpu(pp->ports);
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 7.0.y 3/5] net: macb: drop in-flight Tx SKBs on close
2026-08-05 10:01 [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume Arbab Haider
2026-08-05 10:01 ` [PATCH 7.0.y 2/5] net: mvneta: support EPROBE_DEFER when reading MAC address Arbab Haider
@ 2026-08-05 10:01 ` Arbab Haider
2026-08-05 10:01 ` [PATCH 7.0.y 4/5] net: cpsw_new: unregister devlink on port registration failure Arbab Haider
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Arbab Haider @ 2026-08-05 10:01 UTC (permalink / raw)
To: stable; +Cc: linux-kernel, Théo Lebrun, Nicolai Buchwitz, Paolo Abeni
From: Théo Lebrun <theo.lebrun@bootlin.com>
The MACB driver has since forever leaked the outgoing SKBs that
have not yet been marked as completed. They live in queue->tx_skb
which gets freed without remorse nor checking.
macb_free_consistent() gets called in a few codepaths, but only close will
trigger the added expressions. In macb_open() and macb_alloc_consistent()
failure cases, queues' tx_skb just got allocated and are empty.
Fixes: 89e5785fc8a6 ("[PATCH] Atmel MACB ethernet driver")
Cc: stable@vger.kernel.org
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://patch.msgid.link/20260702-macb-drop-tx-v4-1-1c833eebdbc8@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ Upstream commit 27f575836cfebbf872dec020428742b10650a955 ]
---
drivers/net/ethernet/cadence/macb_main.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 99e7d5cf3786..68dae92205e0 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -2551,8 +2551,25 @@ static void macb_free_consistent(struct macb *bp)
dma_free_coherent(dev, size, bp->queues[0].rx_ring, bp->queues[0].rx_ring_dma);
for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) {
- kfree(queue->tx_skb);
- queue->tx_skb = NULL;
+ if (queue->tx_skb) {
+ unsigned int dropped = 0, tail;
+
+ for (tail = queue->tx_tail; tail != queue->tx_head;
+ tail++) {
+ if (macb_tx_skb(queue, tail)->skb)
+ dropped++;
+ macb_tx_unmap(bp, macb_tx_skb(queue, tail), 0);
+ }
+
+ queue->stats.tx_dropped += dropped;
+ bp->dev->stats.tx_dropped += dropped;
+
+ kfree(queue->tx_skb);
+ queue->tx_skb = NULL;
+ }
+
+ queue->tx_head = 0;
+ queue->tx_tail = 0;
queue->tx_ring = NULL;
queue->rx_ring = NULL;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 7.0.y 4/5] net: cpsw_new: unregister devlink on port registration failure
2026-08-05 10:01 [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume Arbab Haider
2026-08-05 10:01 ` [PATCH 7.0.y 2/5] net: mvneta: support EPROBE_DEFER when reading MAC address Arbab Haider
2026-08-05 10:01 ` [PATCH 7.0.y 3/5] net: macb: drop in-flight Tx SKBs on close Arbab Haider
@ 2026-08-05 10:01 ` Arbab Haider
2026-08-05 10:01 ` [PATCH 7.0.y 5/5] net: stmmac: fix transmit interrupt coalescing Arbab Haider
2026-08-05 16:41 ` [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume Sasha Levin
4 siblings, 0 replies; 9+ messages in thread
From: Arbab Haider @ 2026-08-05 10:01 UTC (permalink / raw)
To: stable
Cc: linux-kernel, Guangshuo Li, Aleksandr Loktionov,
Alexander Sverdlin, Jakub Kicinski
From: Guangshuo Li <lgs201920130244@gmail.com>
cpsw_probe() registers devlink before registering the CPSW ports.
If cpsw_register_ports() fails, the error path only unregisters the
notifiers and then releases the lower level resources. It does not undo
the successful cpsw_register_devlink() call, leaving the devlink instance
and its parameters registered after probe has failed.
Add a devlink cleanup label for the path where devlink registration has
already succeeded, and use it when port registration fails.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Link: https://patch.msgid.link/20260604043115.1409134-1-lgs201920130244@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ Upstream commit b64f763b607426ac97e44b114f0b8844ac3b86dd ]
---
drivers/net/ethernet/ti/cpsw_new.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c
index c5be359f3c66..b6e25a4658d1 100644
--- a/drivers/net/ethernet/ti/cpsw_new.c
+++ b/drivers/net/ethernet/ti/cpsw_new.c
@@ -2050,7 +2050,7 @@ static int cpsw_probe(struct platform_device *pdev)
ret = cpsw_register_ports(cpsw);
if (ret)
- goto clean_unregister_notifiers;
+ goto clean_unregister_devlink;
dev_notice(dev, "initialized (regs %pa, pool size %d) hw_ver:%08X %d.%d (%d)\n",
&ss_res->start, descs_pool_size,
@@ -2062,6 +2062,8 @@ static int cpsw_probe(struct platform_device *pdev)
return 0;
+clean_unregister_devlink:
+ cpsw_unregister_devlink(cpsw);
clean_unregister_notifiers:
cpsw_unregister_notifiers(cpsw);
clean_cpts:
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 7.0.y 5/5] net: stmmac: fix transmit interrupt coalescing
2026-08-05 10:01 [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume Arbab Haider
` (2 preceding siblings ...)
2026-08-05 10:01 ` [PATCH 7.0.y 4/5] net: cpsw_new: unregister devlink on port registration failure Arbab Haider
@ 2026-08-05 10:01 ` Arbab Haider
2026-08-05 16:41 ` [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume Sasha Levin
4 siblings, 0 replies; 9+ messages in thread
From: Arbab Haider @ 2026-08-05 10:01 UTC (permalink / raw)
To: stable; +Cc: linux-kernel, Russell King (Oracle), Simon Horman, Jakub Kicinski
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
The accounting for transmit frames does not count the descriptors
correctly. It uses:
tx_packets = (tx_q->cur_tx + 1) - first_tx;
however, these are indexes into a circular buffer, so cur_tx can be
less than first_tx, and when that happens, tx_packets becomes a very
large unsigned integer. When this is added to tx_q->tx_count_frames,
it has the effect of reducing the count of frames, possibly causing
it to also wrap to a very large unsigned integer.
Fix this by using CIRC_CNT() to calculate the number of descriptors
used.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/E1vuoIl-0000000Aouz-0ttb@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ Upstream commit dd53a0e85969c6b2a5a4e4e46ba05b3187231017 ]
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 81a6ab19a45b..0266b09f0faf 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -14,6 +14,7 @@
https://bugzilla.stlinux.com/
*******************************************************************************/
+#include <linux/circ_buf.h>
#include <linux/clk.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
@@ -4511,7 +4512,8 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
tx_q->tx_skbuff_dma[tx_q->cur_tx].buf_type = STMMAC_TXBUF_T_SKB;
/* Manage tx mitigation */
- tx_packets = (tx_q->cur_tx + 1) - first_tx;
+ tx_packets = CIRC_CNT(tx_q->cur_tx + 1, first_tx,
+ priv->dma_conf.dma_tx_size);
tx_q->tx_count_frames += tx_packets;
if ((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && priv->hwts_tx_en)
@@ -4789,7 +4791,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
* This approach takes care about the fragments: desc is the first
* element in case of no SG.
*/
- tx_packets = (entry + 1) - first_tx;
+ tx_packets = CIRC_CNT(entry + 1, first_tx, priv->dma_conf.dma_tx_size);
tx_q->tx_count_frames += tx_packets;
if ((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && priv->hwts_tx_en)
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume
2026-08-05 10:01 [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume Arbab Haider
` (3 preceding siblings ...)
2026-08-05 10:01 ` [PATCH 7.0.y 5/5] net: stmmac: fix transmit interrupt coalescing Arbab Haider
@ 2026-08-05 16:41 ` Sasha Levin
2026-08-05 18:37 ` Arbab Haider
2026-08-05 18:38 ` Arbab Haider
4 siblings, 2 replies; 9+ messages in thread
From: Sasha Levin @ 2026-08-05 16:41 UTC (permalink / raw)
To: stable
Cc: Sasha Levin, linux-kernel, Yun Zhou, Sebastian Andrzej Siewior,
Jakub Kicinski, Arbab Haider
On Wed, Aug 05, 2026 at 03:01:32PM +0500, Arbab Haider wrote:
> From: Yun Zhou <yun.zhou@windriver.com>
>
> On Marvell MPIC platforms (Armada 370/XP/38x), mvneta uses a percpu
> IRQ disable/enable scheme for NAPI: the ISR (mvneta_percpu_isr) calls
> disable_percpu_irq() to mask the MPIC per-CPU interrupt and schedules
> NAPI poll, which calls enable_percpu_irq() on completion to unmask.
7.0 is EOL?
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume
2026-08-05 16:41 ` [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume Sasha Levin
@ 2026-08-05 18:37 ` Arbab Haider
2026-08-05 18:38 ` Arbab Haider
1 sibling, 0 replies; 9+ messages in thread
From: Arbab Haider @ 2026-08-05 18:37 UTC (permalink / raw)
To: Sasha Levin
Cc: stable, linux-kernel, Yun Zhou, Sebastian Andrzej Siewior,
Jakub Kicinski, Arbab Haider
From: Arbab Haider <arbabhaider6494@gmail.com>
Hi Sasha,
Yes, it is. My mistake. 7.0.y went end-of-life with 7.0.14
(2026-06-27), and I overlooked that when preparing the series.
For context: these five patches are backports of mainline fixes
that I carry in a private 7.0.14 tree used on embedded boards that
are not moving off the 7.0 series in the near term. I sent them
to stable intending to add them to the stable queue, but an EOL
branch is the wrong target. Please drop them.
Since all of them are already in mainline, and therefore in
7.1.y and the longterm branches, nothing further is needed there.
I will keep the backports as out-of-tree patches for the private
tree.
Sorry for the noise.
Thanks,
Arbab
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume
2026-08-05 16:41 ` [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume Sasha Levin
2026-08-05 18:37 ` Arbab Haider
@ 2026-08-05 18:38 ` Arbab Haider
2026-08-06 4:44 ` Greg KH
1 sibling, 1 reply; 9+ messages in thread
From: Arbab Haider @ 2026-08-05 18:38 UTC (permalink / raw)
To: Sasha Levin
Cc: stable, linux-kernel, Yun Zhou, Sebastian Andrzej Siewior,
Jakub Kicinski, Arbab Haider
From: Arbab Haider <arbabhaider6494@gmail.com>
Hi Sasha,
Yes, it is. My mistake. 7.0.y went end-of-life with 7.0.14
(2026-06-27), and I overlooked that when preparing the series.
For context: these five patches are backports of mainline fixes
that I carry in a private 7.0.14 tree used on embedded boards that
are not moving off the 7.0 series in the near term. I sent them
to stable intending to add them to the stable queue, but an EOL
branch is the wrong target. Please drop them.
Since all of them are already in mainline, and therefore in
7.1.y and the longterm branches, nothing further is needed there.
I will keep the backports as out-of-tree patches for the private
tree.
Sorry for the noise.
Thanks,
Arbab
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 7.0.y 1/5] net: mvneta: re-enable percpu interrupt on resume
2026-08-05 18:38 ` Arbab Haider
@ 2026-08-06 4:44 ` Greg KH
0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2026-08-06 4:44 UTC (permalink / raw)
To: Arbab Haider
Cc: Sasha Levin, stable, linux-kernel, Yun Zhou,
Sebastian Andrzej Siewior, Jakub Kicinski, Arbab Haider
On Wed, Aug 05, 2026 at 11:38:03PM +0500, Arbab Haider wrote:
> From: Arbab Haider <arbabhaider6494@gmail.com>
>
> Hi Sasha,
>
> Yes, it is. My mistake. 7.0.y went end-of-life with 7.0.14
> (2026-06-27), and I overlooked that when preparing the series.
>
> For context: these five patches are backports of mainline fixes
> that I carry in a private 7.0.14 tree used on embedded boards that
> are not moving off the 7.0 series in the near term. I sent them
> to stable intending to add them to the stable queue, but an EOL
> branch is the wrong target. Please drop them.
Please note that as of right now, the 7.0.14 kernel currently has:
Total Vulnerable CVE's in 7.0.14 : 387
which might not be good for your embedded systems :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread