Merge remote-tracking branches 'spi/topic/atmel', 'spi/topic/bcm2385', 'spi/topic...
[sfrench/cifs-2.6.git] / net / ipv6 / fib6_rules.c
index b4d5e1d97c1b2576fc02a15b7a05a773197bb8e0..70bc6abc0639cf88d0b23b295c20d941b456d98b 100644 (file)
@@ -104,6 +104,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
                                goto again;
                        flp6->saddr = saddr;
                }
+               err = rt->dst.error;
                goto out;
        }
 again:
@@ -321,7 +322,9 @@ out_fib6_rules_ops:
 
 static void __net_exit fib6_rules_net_exit(struct net *net)
 {
+       rtnl_lock();
        fib_rules_unregister(net->ipv6.fib6_rules_ops);
+       rtnl_unlock();
 }
 
 static struct pernet_operations fib6_rules_net_ops = {