X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=net%2Fipv4%2Froute.c;h=381dd6a6aebbedc10ac861b957cdd1a55932dc52;hb=4fd5f8267dd37aaebadfabe71d9c808821eea05a;hp=8549f26e2495089c8987fd4c241b9ae002a74393;hpb=35d91f75c2c9548e606e813413f03c5cc35da969;p=powerpc.git diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 8549f26e24..381dd6a6ae 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2128,7 +2128,7 @@ int ip_route_input(struct sk_buff *skb, u32 daddr, u32 saddr, struct in_device *in_dev; rcu_read_lock(); - if ((in_dev = __in_dev_get(dev)) != NULL) { + if ((in_dev = __in_dev_get_rcu(dev)) != NULL) { int our = ip_check_mc(in_dev, daddr, saddr, skb->nh.iph->protocol); if (our @@ -2443,7 +2443,9 @@ static int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp) err = -ENODEV; if (dev_out == NULL) goto out; - if (__in_dev_get(dev_out) == NULL) { + + /* RACE: Check return value of inet_select_addr instead. */ + if (__in_dev_get_rtnl(dev_out) == NULL) { dev_put(dev_out); goto out; /* Wrong error code */ }