Thomas Graf wrote: > Derived from net/ipv6/fib_rules.c This clashes with my routing table patch, guess we have to figure out who should go first :)
> +int fib_rules_lookup(struct fib_rules_ops *ops, struct flowi *fl, > + int flags, struct fib_lookup_arg *arg) > +{ > + struct fib_rule *rule; > + int err; > + > + rcu_read_lock(); > + > + list_for_each_entry(rule, ops->rules_list, list) { Shouldn't that be list_for_each_entry_rcu? > + if (rule->ifname[0] && (rule->ifindex != fl->iif)) > + continue; > + > + if (!ops->match(rule, fl, flags)) > + continue; > + > + rcu_read_unlock(); > + > + err = ops->action(rule, fl, flags, arg); > + if (err != -EAGAIN) { > + fib_rule_get(rule); > + arg->rule = rule; > + goto out; > + } > + } > + > + err = -ENETUNREACH; > +out: > + rcu_read_unlock(); rcu_read_unlock might get called multiple times in the list iteration and once again here. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html