summaryrefslogtreecommitdiffstats
path: root/net/core/timestamping.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-01-06 18:24:07 +0900
committerPaul Mundt <lethal@linux-sh.org>2011-01-06 18:24:07 +0900
commitf862f904d357dc0d3612347a8dbabe6fae037fbb (patch)
treed7f5c2d5f85fd9e1cfc36beae904dc4f9cca04a3 /net/core/timestamping.c
parent6f09e41d704fe0bc9157a5357480751d39361d01 (diff)
parent3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5 (diff)
downloadlinux-f862f904d357dc0d3612347a8dbabe6fae037fbb.tar.bz2
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
Conflicts: arch/sh/kernel/cpu/sh2a/clock-sh7201.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'net/core/timestamping.c')
-rw-r--r--net/core/timestamping.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/timestamping.c b/net/core/timestamping.c
index 0ae6c22da85b..c19bb4ee405e 100644
--- a/net/core/timestamping.c
+++ b/net/core/timestamping.c
@@ -96,11 +96,13 @@ bool skb_defer_rx_timestamp(struct sk_buff *skb)
struct phy_device *phydev;
unsigned int type;
- skb_push(skb, ETH_HLEN);
+ if (skb_headroom(skb) < ETH_HLEN)
+ return false;
+ __skb_push(skb, ETH_HLEN);
type = classify(skb);
- skb_pull(skb, ETH_HLEN);
+ __skb_pull(skb, ETH_HLEN);
switch (type) {
case PTP_CLASS_V1_IPV4: