[openwrt/openwrt] lantiq: properly release descriptors in etop driver detach
LEDE Commits
lede-commits at lists.infradead.org
Sun Jul 21 05:09:36 PDT 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c5a443635a24ccbf03fc809339ab0a51982cd133
commit c5a443635a24ccbf03fc809339ab0a51982cd133
Author: Aleksander Jan Bajkowski <olek2 at wp.pl>
AuthorDate: Sat Jul 13 12:11:34 2024 +0200
lantiq: properly release descriptors in etop driver detach
This patch fixes two issues in the driver detach:
* double free of the same descriptor (upstream bug, backported in 66177c081f1b05e4eb7f6c23d97954e8172c4336),
* releasing tx descriptor instead of rx (downstream bug).
The driver is compiled into the kernel that is why the error
is not visible in normal use.
Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
Link: https://github.com/openwrt/openwrt/pull/15939
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
.../lantiq/patches-6.6/0028-NET-lantiq-various-etop-fixes.patch | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/linux/lantiq/patches-6.6/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-6.6/0028-NET-lantiq-various-etop-fixes.patch
index ea3ba66e10..f5b6a0347b 100644
--- a/target/linux/lantiq/patches-6.6/0028-NET-lantiq-various-etop-fixes.patch
+++ b/target/linux/lantiq/patches-6.6/0028-NET-lantiq-various-etop-fixes.patch
@@ -5,8 +5,8 @@ Subject: [PATCH 28/36] NET: lantiq: various etop fixes
Signed-off-by: John Crispin <blogic at openwrt.org>
---
- drivers/net/ethernet/lantiq_etop.c | 555 +++++++++++++++++++++++++-----------
- 1 file changed, 389 insertions(+), 166 deletions(-)
+ drivers/net/ethernet/lantiq_etop.c | 531 ++++++++++++++++++++---------
+ 1 file changed, 374 insertions(+), 157 deletions(-)
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -275,7 +275,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
if (ch->dma.irq)
free_irq(ch->dma.irq, priv);
- if (IS_RX(ch->idx)) {
-+ if (ch == &priv->txch) {
++ if (ch == &priv->rxch) {
struct ltq_dma_channel *dma = &ch->dma;
for (dma->desc = 0; dma->desc < LTQ_DESC_NUM; dma->desc++)
More information about the lede-commits
mailing list