summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefan Sørensen <stefan.sorensen@spectralink.com>2015-11-03 08:34:06 (GMT)
committerDavid S. Miller <davem@davemloft.net>2015-11-03 16:08:21 (GMT)
commitccf6ee9a6980eff9ec0eeaa8f63c65bff34d9697 (patch)
tree91e7669d70a7a843e2a81e440bf465b8ba5fecf8 /drivers
parent4b063258ab9360207a4f6913d31d761bd85631ab (diff)
downloadlinux-ccf6ee9a6980eff9ec0eeaa8f63c65bff34d9697.tar.xz
dp83640: Prune rx timestamp list before reading from it
The list of rx timestamps are currently only pruned of old entries when a new entry is inserted. If no new entries are added, old timestamps may survive beyond their lifetime, possible causing them to be attached to packets with the same sequence number after a rollover. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/dp83640.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index 69a2f56..39ac633 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -1398,6 +1398,7 @@ static bool dp83640_rxtstamp(struct phy_device *phydev,
return false;
spin_lock_irqsave(&dp83640->rx_lock, flags);
+ prune_rx_ts(dp83640);
list_for_each_safe(this, next, &dp83640->rxts) {
rxts = list_entry(this, struct rxts, list);
if (match(skb, type, rxts)) {