Re: [PATCH net v3 2/2] net: macb: drop in-flight Tx SKBs on close

From: Nicolai Buchwitz

Date: Wed Jun 17 2026 - 05:57:49 EST


On 17.6.2026 11:17, Théo Lebrun wrote:
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, tx_skb just got allocated
and is empty.

Use the new macb_tx_unmap() prototype to report our error as
SKB_DROP_REASON_NOT_SPECIFIED rather than SKB_CONSUMED which makes it
sound like no error occurred. Equivalent to dev_kfree_skb_any().

Fixes: 89e5785fc8a6 ("[PATCH] Atmel MACB ethernet driver")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Théo Lebrun <theo.lebrun@xxxxxxxxxxx>
---

[...]

Reviewed-by: Nicolai Buchwitz <nb@xxxxxxxxxxx>

Thanks,
Nicolai