summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorManfred Rudigier <Manfred.Rudigier@omicron.at>2012-01-10 00:26:50 +0100
committerDavid S. Miller <davem@davemloft.net>2012-01-13 00:26:01 +0100
commitdb83d136d7f7534857cd9c6e588adc08a428b190 (patch)
treef52e6d1092b01b395de9b180707e47822a168829 /drivers/net
parentphylib: introduce mdiobus_alloc_size() (diff)
downloadlinux-db83d136d7f7534857cd9c6e588adc08a428b190.tar.xz
linux-db83d136d7f7534857cd9c6e588adc08a428b190.zip
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')
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c4
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;
}