[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1446207244-2206-4-git-send-email-stefan.sorensen@spectralink.com>
Date: Fri, 30 Oct 2015 13:14:02 +0100
From: Stefan Sørensen
<stefan.sorensen@...ctralink.com>
To: <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <richardcochran@...il.com>,
Stefan Sørensen
<stefan.sorensen@...ctralink.com>
Subject: [PATCH net-next 3/5] 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@...ctralink.com>
---
drivers/net/phy/dp83640.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index f3e812b..c1f70b7 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -1394,6 +1394,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)) {
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists