stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "dp83640: don't recieve time stamps twice" has been added to the 4.4-stable tree
@ 2017-04-30 14:11 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-04-30 14:11 UTC (permalink / raw)
  To: dan.carpenter, davem, gregkh, stefan.sorensen; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    dp83640: don't recieve time stamps twice

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dp83640-don-t-recieve-time-stamps-twice.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Sun Apr 30 15:46:17 CEST 2017
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue, 18 Apr 2017 22:14:26 +0300
Subject: dp83640: don't recieve time stamps twice

From: Dan Carpenter <dan.carpenter@oracle.com>


[ 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>
---
 drivers/net/phy/dp83640.c |    2 --
 1 file changed, 2 deletions(-)

--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -1436,8 +1436,6 @@ static bool dp83640_rxtstamp(struct phy_
 		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;


Patches currently in stable-queue which might be from dan.carpenter@oracle.com are

queue-4.4/dp83640-don-t-recieve-time-stamps-twice.patch
queue-4.4/xc2028-unlock-on-error-in-xc2028_set_config.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-30 14:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-30 14:11 Patch "dp83640: don't recieve time stamps twice" has been added to the 4.4-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).