diff options
author | Manfred Rudigier <Manfred.Rudigier@omicron.at> | 2012-01-10 03:26:50 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-13 03:26:01 +0400 |
commit | db83d136d7f7534857cd9c6e588adc08a428b190 (patch) | |
tree | f52e6d1092b01b395de9b180707e47822a168829 /drivers/net/ethernet/freescale | |
parent | eb8a54a78e974e1af3e17fa38bb74d3747c5c1bd (diff) | |
download | linux-db83d136d7f7534857cd9c6e588adc08a428b190.tar.xz |
gianfar: Fix missing sock reference when processing TX time stamps
When there is not enough headroom in the skb a private copy will be made.
However, the private copy had no reference to the socket and consequently
no time stamp could be queued on the socket error queue during the
skb_tstamp_tx function. This patch fixes this issue by also stealing the
sock reference from the original skb after making the private copy.
Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index e01cdaa722a9..2b3c12992127 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -2086,6 +2086,10 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev) kfree_skb(skb); return NETDEV_TX_OK; } + + /* Steal sock reference for processing TX time stamps */ + swap(skb_new->sk, skb->sk); + swap(skb_new->destructor, skb->destructor); kfree_skb(skb); skb = skb_new; } |