Skip to content

Commit f6b34b1

Browse files
Dan Carpentergregkh
authored andcommitted
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: 4b06325 ("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>
1 parent 78c4e3d commit f6b34b1

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

drivers/net/phy/dp83640.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,8 +1436,6 @@ static bool dp83640_rxtstamp(struct phy_device *phydev,
14361436
skb_info->tmo = jiffies + SKB_TIMESTAMP_TIMEOUT;
14371437
skb_queue_tail(&dp83640->rx_queue, skb);
14381438
schedule_delayed_work(&dp83640->ts_work, SKB_TIMESTAMP_TIMEOUT);
1439-
} else {
1440-
netif_rx_ni(skb);
14411439
}
14421440

14431441
return true;

0 commit comments

Comments
 (0)