Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328111
b: refs/heads/master
c: b0558ef
h: refs/heads/master
i:
  328109: 19ae9ab
  328107: f55216c
  328103: 56eb417
  328095: 8a16a48
v: v3
  • Loading branch information
stephen hemminger authored and David S. Miller committed Sep 27, 2012
1 parent 2dead5f commit 13040b0
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c5794a66c7c6443759e6098841767958a031187
refs/heads/master: b0558ef24a792906914fcad277f3befe2420e618
5 changes: 0 additions & 5 deletions trunk/net/ipv4/ip_vti.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ static int vti_err(struct sk_buff *skb, u32 info)

err = -ENOENT;

rcu_read_lock();
t = vti_tunnel_lookup(dev_net(skb->dev), iph->daddr, iph->saddr);
if (t == NULL)
goto out;
Expand All @@ -326,7 +325,6 @@ static int vti_err(struct sk_buff *skb, u32 info)
t->err_count = 1;
t->err_time = jiffies;
out:
rcu_read_unlock();
return err;
}

Expand All @@ -336,7 +334,6 @@ static int vti_rcv(struct sk_buff *skb)
struct ip_tunnel *tunnel;
const struct iphdr *iph = ip_hdr(skb);

rcu_read_lock();
tunnel = vti_tunnel_lookup(dev_net(skb->dev), iph->saddr, iph->daddr);
if (tunnel != NULL) {
struct pcpu_tstats *tstats;
Expand All @@ -348,10 +345,8 @@ static int vti_rcv(struct sk_buff *skb)
u64_stats_update_end(&tstats->syncp);

skb->dev = tunnel->dev;
rcu_read_unlock();
return 1;
}
rcu_read_unlock();

return -1;
}
Expand Down
9 changes: 1 addition & 8 deletions trunk/net/ipv4/ipip.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,6 @@ static int ipip_err(struct sk_buff *skb, u32 info)
}

err = -ENOENT;

rcu_read_lock();
t = ipip_tunnel_lookup(dev_net(skb->dev), iph->daddr, iph->saddr);
if (t == NULL)
goto out;
Expand Down Expand Up @@ -398,7 +396,7 @@ static int ipip_err(struct sk_buff *skb, u32 info)
t->err_count = 1;
t->err_time = jiffies;
out:
rcu_read_unlock();

return err;
}

Expand All @@ -416,13 +414,11 @@ static int ipip_rcv(struct sk_buff *skb)
struct ip_tunnel *tunnel;
const struct iphdr *iph = ip_hdr(skb);

rcu_read_lock();
tunnel = ipip_tunnel_lookup(dev_net(skb->dev), iph->saddr, iph->daddr);
if (tunnel != NULL) {
struct pcpu_tstats *tstats;

if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) {
rcu_read_unlock();
kfree_skb(skb);
return 0;
}
Expand All @@ -445,11 +441,8 @@ static int ipip_rcv(struct sk_buff *skb)
ipip_ecn_decapsulate(iph, skb);

netif_rx(skb);

rcu_read_unlock();
return 0;
}
rcu_read_unlock();

return -1;
}
Expand Down
6 changes: 0 additions & 6 deletions trunk/net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ static int ipip6_err(struct sk_buff *skb, u32 info)

err = -ENOENT;

rcu_read_lock();
t = ipip6_tunnel_lookup(dev_net(skb->dev),
skb->dev,
iph->daddr,
Expand Down Expand Up @@ -579,7 +578,6 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
t->err_count = 1;
t->err_time = jiffies;
out:
rcu_read_unlock();
return err;
}

Expand All @@ -599,7 +597,6 @@ static int ipip6_rcv(struct sk_buff *skb)

iph = ip_hdr(skb);

rcu_read_lock();
tunnel = ipip6_tunnel_lookup(dev_net(skb->dev), skb->dev,
iph->saddr, iph->daddr);
if (tunnel != NULL) {
Expand All @@ -615,7 +612,6 @@ static int ipip6_rcv(struct sk_buff *skb)
if ((tunnel->dev->priv_flags & IFF_ISATAP) &&
!isatap_chksrc(skb, iph, tunnel)) {
tunnel->dev->stats.rx_errors++;
rcu_read_unlock();
kfree_skb(skb);
return 0;
}
Expand All @@ -630,12 +626,10 @@ static int ipip6_rcv(struct sk_buff *skb)

netif_rx(skb);

rcu_read_unlock();
return 0;
}

/* no tunnel matched, let upstream know, ipsec may handle it */
rcu_read_unlock();
return 1;
out:
kfree_skb(skb);
Expand Down

0 comments on commit 13040b0

Please sign in to comment.