diff mbox series

[v2,1/2] net: mscc: ocelot: avoid incorrect consuming in skbs list

Message ID 20191127072757.34502-2-yangbo.lu@nxp.com
State Accepted
Delegated to: David Miller
Headers show
Series net: mscc: ocelot: fix potential issues accessing skbs list | expand

Commit Message

Yangbo Lu Nov. 27, 2019, 7:27 a.m. UTC
Break the matching loop when find the matching skb for TX timestamp.
This is to avoid consuming more skbs incorrectly. The timestamp ID
is from 0 to 3 while the FIFO could support 128 timestamps at most.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
Changes for v2:
	- Split a single patch for this fix-up.
---
 drivers/net/ethernet/mscc/ocelot.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 0e96ffa..6dc9de3 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -736,6 +736,7 @@  void ocelot_get_txtstamp(struct ocelot *ocelot)
 
 			list_del(pos);
 			kfree(entry);
+			break;
 		}
 
 		/* Next ts */