[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1326187612-27384-1-git-send-email-manfred.rudigier@omicron.at>
Date: Tue, 10 Jan 2012 10:26:50 +0100
From: Manfred Rudigier <manfred.rudigier@...cron.at>
To: <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <afleming@...escale.com>,
<avorontsov@...sta.com>, <richardcochran@...il.com>,
<eric.dumazet@...il.com>,
Manfred Rudigier <manfred.rudigier@...cron.at>
Subject: [PATCH v3 1/2] 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@...cron.at>
---
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 83199fd..e11d422 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;
}
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists