summaryrefslogtreecommitdiff
path: root/drivers/net/phy/dp83640.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-04-18 22:14:26 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-03 07:19:53 +0300
commitf6b34b1709acec5c7a4d83f43b52595466a32c37 (patch)
tree7dbd42a19d6972ad9eee1d282079f7a68ba24fc8 /drivers/net/phy/dp83640.c
parent78c4e3d4848d86c1ed36181c71c9c96834e910ed (diff)
downloadlinux-f6b34b1709acec5c7a4d83f43b52595466a32c37.tar.xz
dp83640: don't recieve time stamps twice
[ Upstream commit 9d386cd9a755c8293e8916264d4d053878a7c9c7 ] This patch is prompted by a static checker warning about a potential use after free. The concern is that netif_rx_ni() can free "skb" and we call it twice. When I look at the commit that added this, it looks like some stray lines were added accidentally. It doesn't make sense to me that we would recieve the same data two times. I asked the author but never recieved a response. I can't test this code, but I'm pretty sure my patch is correct. Fixes: 4b063258ab93 ("dp83640: Delay scheduled work.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/phy/dp83640.c')
-rw-r--r--drivers/net/phy/dp83640.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index e6cefd0e3262..84b9cca152eb 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -1436,8 +1436,6 @@ static bool dp83640_rxtstamp(struct phy_device *phydev,
skb_info->tmo = jiffies + SKB_TIMESTAMP_TIMEOUT;
skb_queue_tail(&dp83640->rx_queue, skb);
schedule_delayed_work(&dp83640->ts_work, SKB_TIMESTAMP_TIMEOUT);
- } else {
- netif_rx_ni(skb);
}
return true;