Message ID | 1499075673.1462.4.camel@edumazet-glaptop3.roam.corp.google.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Eric Dumazet <eric.dumazet@gmail.com> Date: Mon, 03 Jul 2017 02:54:33 -0700 > From: Eric Dumazet <edumazet@google.com> > > We need to use refcount_set() on a newly created rule to avoid > following error : ... > Fixes: 717d1e993ad8 ("net: convert fib_rule.refcnt from atomic_t to refcount_t") > Signed-off-by: Eric Dumazet <edumazet@google.com> Applied.
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index c4ecd9f75a47f1c861e11b21f55768053609b649..a0093e1b0235355db66b980580243dd6619c9aa6 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -517,7 +517,7 @@ int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, last = r; } - fib_rule_get(rule); + refcount_set(&rule->refcnt, 1); if (last) list_add_rcu(&rule->list, &last->list);