]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: mscc: ocelot: avoid incorrect consuming in skbs list
authorYangbo Lu <yangbo.lu@nxp.com>
Wed, 27 Nov 2019 07:27:56 +0000 (15:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Nov 2019 18:53:37 +0000 (10:53 -0800)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c

index 0e96ffab3b05daeb1f56e1ef942117e3fbd49041..6dc9de3454ba7c0975cd727c408a8c4b74460733 100644 (file)
@@ -736,6 +736,7 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
 
                        list_del(pos);
                        kfree(entry);
+                       break;
                }
 
                /* Next ts */