[PATCH 30/31] net/drivers: fec: fix dev_kfree_rtskb on wrong buffer

Jean-Baptiste Trédez jean-baptiste.tredez at alstefgroup.com
Tue May 11 18:05:34 CEST 2021


Signed-off-by: Jean-Baptiste Trédez <jean-baptiste.tredez at alstefgroup.com>
---
 kernel/drivers/net/drivers/freescale/fec_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/drivers/net/drivers/freescale/fec_main.c b/kernel/drivers/net/drivers/freescale/fec_main.c
index 62e8d5158..56ea27cf4 100644
--- a/kernel/drivers/net/drivers/freescale/fec_main.c
+++ b/kernel/drivers/net/drivers/freescale/fec_main.c
@@ -1145,7 +1145,7 @@ static void fec_enet_reset_skb(struct net_device *ndev)
 		for (j = 0; j < txq->bd.ring_size; j++) {
 			if (txq->tx_skbuff[j]) {
 				if (fep->rtnet.enabled)
-					dev_kfree_rtskb(txq->tx_rtbuff[i]);
+					dev_kfree_rtskb(txq->tx_rtbuff[j]);
 				else
 					dev_kfree_skb_any(txq->tx_skbuff[j]);
 				txq->tx_skbuff[j] = NULL;
-- 
2.17.1




More information about the Xenomai mailing list