diff options
| author | Théo Lebrun <theo.lebrun@bootlin.com> | 2026-09-18 21:53:52 +0200 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-09-22 13:33:50 +0200 |
| commit | 23d42b9a3bcd55b17d3b371544fedc708c2397e9 (patch) | |
| tree | c8f3f554c5c1f988a2cdcd2b7f5efd4b7f70d140 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 999e8295bc41d6ce45b8e54f88150efa96f3f01e (diff) | |
| download | linux-23d42b9a3bcd55b17d3b371544fedc708c2397e9.tar.gz linux-23d42b9a3bcd55b17d3b371544fedc708c2397e9.zip | |
net: macb: fix dma_alloc_coherent() leak on macb_alloc() error paths
Fix 3 leaks in macb_alloc() error paths:
- Tx buffer allocated but crossing a 4G boundary: Tx leaked.
- Rx buffer allocation fails: Tx leaked.
- Rx buffer allocated but crossing a 4G boundary: Tx & Rx leaked.
This is because our error handling calls macb_free(bp) which in turn
frees the buffers stored in bp->queues[0], but nothing has been stored
in there. Fix by storing allocated buffers into bp->queues[0] ASAP.
Fixes: 78d901897b3c ("net: macb: single dma_alloc_coherent() for DMA descriptors")
Cc: stable@vger.kernel.org
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Link: https://patch.msgid.link/20260918-macb-alloc-leak-v1-1-aba9a3d4f6e3@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
