]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: eth: avoid TX buffer memory leak
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sun, 24 May 2026 08:41:55 +0000 (10:41 +0200)
committerMarkus Stockhausen <markus.stockhausen@gmx.de>
Sat, 30 May 2026 06:50:00 +0000 (08:50 +0200)
commit8fd3e2fbec33f53e7a452b7cb2b41e1cff1bb837
tree00bd122c306d6661e0c24078d5b4dcf3216e59e0
parentb0e263a5ed4807c2a7c039cd951053fa638ef409
realtek: eth: avoid TX buffer memory leak

Although never observed, a transmit timeout might happen.
In that case there is a resource leak inside rteth_tx_timeout().
This happens when rteth_setup_ring_buffer() reinitializes the
transmit buffers and overwrites all transmit slots. Any linked
SKB is lost and leaked at this point.

Be defensive and add a cleanup rteth_free_tx_buffers() function.
Call this alongside rteth_free_rx_buffers() where needed.

Link: https://github.com/openwrt/openwrt/pull/23483
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
target/linux/realtek/files-6.18/drivers/net/ethernet/rtl838x_eth.c